]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/chrome: chromeos_tbmc: Convert to a platform driver
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 Mar 2026 19:42:25 +0000 (20:42 +0100)
committerTzung-Bi Shih <tzungbi@kernel.org>
Fri, 6 Mar 2026 04:35:07 +0000 (04:35 +0000)
commita2676ead257f6cf12e458efc786a68d6ab7c1224
treed132b05dc5350e0f4bed7315951160ddb50e2f11
parentde1260139dbd7610a2f25343c962569b8fe23f8f
platform/chrome: chromeos_tbmc: Convert to a platform driver

In all cases in which a struct acpi_driver is used for binding a driver
to an ACPI device object, a corresponding platform device is created by
the ACPI core and that device is regarded as a proper representation of
underlying hardware.  Accordingly, a struct platform_driver should be
used by driver code to bind to that device.  There are multiple reasons
why drivers should not bind directly to ACPI device objects [1].

Overall, it is better to bind drivers to platform devices than to their
ACPI companions, so convert the ChromeOS tablet mode change (TBMC) ACPI
driver to a platform one.

After this change, the subordinate input device and wakeup source class
device will be registered under the platform device used for driver
binding instead of its ACPI companion.

While this is not expected to alter functionality, it changes sysfs
layout and so it will be visible to user space.

Link: https://lore.kernel.org/all/2396510.ElGaqSPkdT@rafael.j.wysocki/
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/10827297.nUPlyArG6x@rafael.j.wysocki
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/chromeos_tbmc.c