diff options
author | Hans de Goede <hdegoede@redhat.com> | 2022-02-24 12:02:40 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2022-03-02 12:31:10 +0100 |
commit | 60c7353c6b23537448c7b24498f7bbf8973a81ef (patch) | |
tree | 7f1b670a4f29e3431ed5f4317bfc1af9677ed36b /drivers/acpi/scan.c | |
parent | cb18448bbf1c845aecaa09b04cfdcceb070d9236 (diff) | |
download | linux-stable-60c7353c6b23537448c7b24498f7bbf8973a81ef.tar.gz linux-stable-60c7353c6b23537448c7b24498f7bbf8973a81ef.tar.bz2 linux-stable-60c7353c6b23537448c7b24498f7bbf8973a81ef.zip |
Input: soc_button_array - add support for Microsoft Surface 3 (MSHW0028) buttons
The drivers/platform/surface/surface3_button.c code is alsmost a 1:1 copy
of the soc_button_array code.
The only big difference is that it binds to an i2c_client rather then to
a platform_device. The cause of this is the ACPI resources for the MSHW0028
device containing a bogus I2cSerialBusV2 resource which causes the kernel
to instantiate an i2c_client for it instead of a platform_device.
Add "MSHW0028" to the ignore_serial_bus_ids[] list in drivers/apci/scan.c,
so that a platform_device will be instantiated and add support for
the MSHW0028 HID to soc_button_array.
This fully replaces surface3_button, which will be removed in a separate
commit (since it binds to the now no longer created i2c_client it no
longer does anyyhing after this commit).
Note the MSHW0028 id is used by Microsoft to describe the tablet buttons on
both the Surface 3 and the Surface 3 Pro and the actual API/implementation
for the Surface 3 Pro is quite different. The changes in this commit should
not impact the separate surfacepro3_button driver:
1. Because of the bogus I2cSerialBusV2 resource problem that driver binds
to the acpi_device itself, so instantiating a platform_device instead of
an i2c_client does not matter.
2. The soc_button_array driver will not bind to the MSHW0028 device on
the Surface 3 Pro, because it has no GPIO resources.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20220224110241.9613-2-hdegoede@redhat.com
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 4463c2eda61e..e993c8b253f5 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1750,6 +1750,11 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) /* Non-conforming _HID for Cirrus Logic already released */ {"CLSA0100", }, /* + * Some ACPI devs contain SerialBus resources even though they are not + * attached to a serial bus at all. + */ + {"MSHW0028", }, + /* * HIDs of device with an UartSerialBusV2 resource for which userspace * expects a regular tty cdev to be created (instead of the in kernel * serdev) and which have a kernel driver which expects a platform_dev |