All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Linux ACPI" <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Bjorn Helgaas" <helgaas@kernel.org>,
	"Zhang Rui" <rui.zhang@intel.com>,
	"Chen Yu" <yu.c.chen@intel.com>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Linux PCI" <linux-pci@vger.kernel.org>,
	"Alex Hung" <alexhung@gmail.com>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	platform-driver-x86@vger.kernel.org,
	"AceLan Kao" <acelan.kao@canonical.com>
Subject: Re: [PATCH v1 2/4] platform/x86/intel/hid: Stop creating a platform device
Date: Sun, 28 Dec 2025 21:13:31 +0200	[thread overview]
Message-ID: <aVGBW4UcRAaxtbCX@smile.fi.intel.com> (raw)
In-Reply-To: <6115868.MhkbZ0Pkbq@rafael.j.wysocki>

On Mon, Dec 15, 2025 at 02:35:05PM +0100, Rafael J. Wysocki wrote:
> 
> Now that "system" devices are represented as platform devices, they
> are not claimed by the PNP ACPI scan handler any more and the Intel
> HID platform devices should be created by the ACPI core, so the
> driver does not need to attempt to create a platform device by
> itself.
> 
> Accordingly, make it stop doing so.
> 
> No intentional functional impact.

...

>  	.remove = intel_hid_remove,
>  };

>  

This blank line now can also be removed as the module_platform_driver() coupled
with the above structure initialiser.

> -/*
> - * Unfortunately, some laptops provide a _HID="INT33D5" device with
> - * _CID="PNP0C02".  This causes the pnpacpi scan driver to claim the
> - * ACPI node, so no platform device will be created.  The pnpacpi
> - * driver rejects this device in subsequent processing, so no physical
> - * node is created at all.
> - *
> - * As a workaround until the ACPI core figures out how to handle
> - * this corner case, manually ask the ACPI platform device code to
> - * claim the ACPI node.
> - */
> -static acpi_status __init
> -check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
> -{
> -	const struct acpi_device_id *ids = context;
> -	struct acpi_device *dev = acpi_fetch_acpi_dev(handle);
> -
> -	if (dev && acpi_match_device_ids(dev, ids) == 0)
> -		if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
> -			dev_info(&dev->dev,
> -				 "intel-hid: created platform device\n");
> -
> -	return AE_OK;
> -}
> -
> -static int __init intel_hid_init(void)
> -{
> -	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
> -			    ACPI_UINT32_MAX, check_acpi_dev, NULL,
> -			    (void *)intel_hid_ids, NULL);
> -
> -	return platform_driver_register(&intel_hid_pl_driver);
> -}
> -module_init(intel_hid_init);
> -
> -static void __exit intel_hid_exit(void)
> -{
> -	platform_driver_unregister(&intel_hid_pl_driver);
> -}
> -module_exit(intel_hid_exit);
> +module_platform_driver(intel_hid_pl_driver);

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-12-28 19:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 13:31 [PATCH v1 0/4] ACPI: scan: Handle generic system devices directly Rafael J. Wysocki
2025-12-15 13:34 ` [PATCH v1 1/4] ACPI: PNP: Drop PNP0C01 and PNP0C02 from acpi_pnp_device_ids[] Rafael J. Wysocki
2025-12-15 21:18   ` Mario Limonciello
2025-12-16 11:44     ` Rafael J. Wysocki
2025-12-28 19:11   ` Andy Shevchenko
2025-12-29 13:12     ` Rafael J. Wysocki
2025-12-29 13:58       ` Andy Shevchenko
2025-12-15 13:35 ` [PATCH v1 2/4] platform/x86/intel/hid: Stop creating a platform device Rafael J. Wysocki
2025-12-28 19:13   ` Andy Shevchenko [this message]
2025-12-29 13:07     ` Rafael J. Wysocki
2025-12-29 13:59       ` Andy Shevchenko
2025-12-15 13:35 ` [PATCH v1 3/4] platform/x86/intel/vbtn: " Rafael J. Wysocki
2025-12-28 19:14   ` Andy Shevchenko
2025-12-15 13:36 ` [PATCH v1 4/4] ACPI: PNP: Drop acpi_nonpnp_device_ids[] Rafael J. Wysocki
2025-12-16 14:03 ` [PATCH v1 0/4] ACPI: scan: Handle generic system devices directly Mario Limonciello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aVGBW4UcRAaxtbCX@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=acelan.kao@canonical.com \
    --cc=alexhung@gmail.com \
    --cc=hansg@kernel.org \
    --cc=helgaas@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.