Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8199714rwl; Tue, 10 Jan 2023 10:11:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXtI3jkeJoG5x+kIdE3MOZ5Y6sBz42gEdKwLXVSVHY4iQOg34N4b4938FzkWXMHaqAvrkbPB X-Received: by 2002:a05:6a00:896:b0:586:35dd:91c3 with SMTP id q22-20020a056a00089600b0058635dd91c3mr16516728pfj.29.1673374308648; Tue, 10 Jan 2023 10:11:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673374308; cv=none; d=google.com; s=arc-20160816; b=E/4jJwpEElxeU4RqcinNT9addPGa3oLle4vBqQrYbTeNJA9Sx8CV9uhpjFU3xtNeug hFk+TFWwImUubED3THhzoru2mw5Xk5/WJrfmc/4JP4Rc46OPT9kNwRo+/OTCo/47u18Z VWQ9d3v7CDLvuj6I3mOJyIYvBRzVH/L1Jg+/9AbG6DMg5AM4GQpsdg7HhJCecHTYpeZi uOq9Ar7I70OPUJLZzDyRYVWrnw9A9RhPVoauAorUPtEWGVe1s//Cgy/sJgojDsmVicPO F11oSdSpNgl5/oadfF8aBwVrnv5Fp98CjNZlKjJmQaCmq0/ctmUPg4BVsi8azem0ql0h 0vNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=H3LJB6gI8KUNdcfsnFIDgFRNaIb6DV5Taoazh/9SA1Y=; b=EsNHWxVPdofotNDyISOej98W9HeFwFK1e7G5ZKEKJIgQS2yWrS6isSGbQsVTMnmAFI 6pHwQVCg3qFJzl9U0KrZy58vS4jbdBmU0n3VqjwkVbNSM/IsZT3p9kai+uVgNJGDci7J TTSkcGKubv9LH5wBDXeE7BWRX0IhgQgb8sEa16X0PLa2mPz9s7T8yEJsAsbrRvys3fv6 kXFkKftQc8stYaRr23rLMPKq9tF4g7YCOsSMKD4YHfc/brRBB80GJW8HaJyQIfEkSLpK 23uOxC+z2ihhy2Tu+FMpp8orm2S+BmjkKuXfbMvbwS6V0WxBaceZhiQyKGepaMQrkwIg oH1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h1-20020a056a00218100b005808bb470a0si12139806pfi.180.2023.01.10.10.11.40; Tue, 10 Jan 2023 10:11:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234694AbjAJR7T (ORCPT + 53 others); Tue, 10 Jan 2023 12:59:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238843AbjAJR6R (ORCPT ); Tue, 10 Jan 2023 12:58:17 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B907A44E; Tue, 10 Jan 2023 09:58:09 -0800 (PST) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.1.0) id 322c10ed6f9fbde9; Tue, 10 Jan 2023 18:58:07 +0100 Received: from kreacher.localnet (unknown [213.134.183.108]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 9B0452625407; Tue, 10 Jan 2023 18:58:06 +0100 (CET) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Chen Yu , Zhang Rui Subject: [PATCH v1] ACPI: PNP: Introduce list of known non-PNP devices Date: Tue, 10 Jan 2023 18:58:05 +0100 Message-ID: <12149290.O9o76ZdvQC@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.183.108 X-CLIENT-HOSTNAME: 213.134.183.108 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrledvgdeghecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeffffffkefgheehffelteeiveeffeevhfelteejvddvieejjeelvdeiheeuveeuffenucfkphepvddufedrudefgedrudekfedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrddukeefrddutdekpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohephihurdgtrdgthhgvnhesihhnthgvlhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=4 Fuz1=4 Fuz2=4 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki In some cases, PNP device IDs from acpi_pnp_device_ids[] are returned by _CID for devices for which matching platform drivers are present in the kernel and should be bound to them. However, the IDs coming from _CID cause the PNP scan handler to attach to those devices which prevents platform device objects from being created for them. Address this by introducing a list of known non-PNP device IDs into acpi_pnp.c such that if a device ID is there in that list, it cannot be attached to by the PNP scan handler and add the platform runtime update and telemetry device IDs to that list to start with. Reported-by: Chen Yu Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_pnp.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) Index: linux-pm/drivers/acpi/acpi_pnp.c =================================================================== --- linux-pm.orig/drivers/acpi/acpi_pnp.c +++ linux-pm/drivers/acpi/acpi_pnp.c @@ -348,10 +348,22 @@ static bool acpi_pnp_match(const char *i return false; } +/* + * If one of the device IDs below is present in the list of device IDs of a + * given ACPI device object, the PNP scan handler will not attach to that + * object, because there is a proper non-PNP driver in the kernel for the + * device represented by it. + */ +static const struct acpi_device_id acpi_nonpnp_device_ids[] = { + {"INTC1080"}, + {"INTC1081"}, + {""}, +}; + static int acpi_pnp_attach(struct acpi_device *adev, const struct acpi_device_id *id) { - return 1; + return !!acpi_match_device_ids(adev, acpi_nonpnp_device_ids); } static struct acpi_scan_handler acpi_pnp_handler = {