mirror-linux/drivers/platform/surface
Rafael J. Wysocki d913a5a12b
platform/surface: surfacepro3_button: 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 Surface Pro 3 button 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/ [1]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3207406.CbtlEUcBR6@rafael.j.wysocki
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-03-09 16:10:37 +02:00
..
aggregator Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig platform: Do not enable by default during compile testing 2025-04-24 15:53:35 +03:00
Makefile
surface3-wmi.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
surface3_power.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
surface_acpi_notify.c platform/surface: acpi-notify: add WQ_PERCPU to alloc_workqueue users 2025-11-28 12:06:58 +02:00
surface_aggregator_cdev.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
surface_aggregator_hub.c
surface_aggregator_registry.c platform/surface: aggregator_registry: Add Surface Pro 11 (QCOM) 2026-01-10 13:17:01 +02:00
surface_aggregator_tabletsw.c
surface_dtx.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
surface_gpe.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
surface_hotplug.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
surface_platform_profile.c ACPI: platform_profile: Remove platform_profile_handler from exported symbols 2025-01-17 19:15:59 +02:00
surfacepro3_button.c platform/surface: surfacepro3_button: Convert to a platform driver 2026-03-09 16:10:37 +02:00