]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86: classmate-laptop: Convert accel driver to a platform one
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 11 May 2026 20:11:39 +0000 (22:11 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 20 May 2026 10:07:18 +0000 (13:07 +0300)
commite51effb3cefe1bffa1afdee6ee5e93ded1746606
treeeb112126e24f5c95a00243cad4c2bb1857e260bd
parent1588b83ad9b95dfa0bc3b9c22eb2608b64e1a3c5
platform/x86: classmate-laptop: Convert accel driver to a platform one

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 cmpc_accel_acpi_driver in the Classmate
laptop driver from an ACPI driver to a platform one.

After this change, the input device registered by the driver will
appear under the platform device used for driver binding, but the sysfs
attribute added by the driver under the ACPI companion of that device
will stay there in case there are utilities in user space expecting
it to be present there.

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>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Link: https://patch.msgid.link/24365138.6Emhk5qWAg@rafael.j.wysocki
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/classmate-laptop.c