diff mbox series

[v2] Input: exc3000 - add ACPI support for EXC80H60

Message ID 20230705091817.1300928-1-andreaskleist@gmail.com (mailing list archive)
State New
Headers show
Series [v2] Input: exc3000 - add ACPI support for EXC80H60 | expand

Commit Message

Andreas Helbech Kleist July 5, 2023, 9:18 a.m. UTC
EXC80H60 is used in Ambu aBox2 with ACPI _HID "EGA00001".

Snippet of from "apcidump -b; iasl ssdt2.dat" on target:

        Device (TPL2)
        {
            Name (HID2, Zero)
            Name (_HID, "EGA00001")  // _HID: Hardware ID
            Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */)
		// _CID: Compatible ID
            Name (_S0W, 0x04)  // _S0W: S0 Device Wake State
            Name (SBFB, ResourceTemplate ()

Signed-off-by: Andreas Helbech Kleist <andreaskleist@gmail.com>
---
v2:
- Fixed compiler warning reported by kernel test robot

 drivers/input/touchscreen/exc3000.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Dmitry Torokhov July 5, 2023, 7:32 p.m. UTC | #1
On Wed, Jul 05, 2023 at 11:18:16AM +0200, Andreas Helbech Kleist wrote:
> EXC80H60 is used in Ambu aBox2 with ACPI _HID "EGA00001".
> 
> Snippet of from "apcidump -b; iasl ssdt2.dat" on target:
> 
>         Device (TPL2)
>         {
>             Name (HID2, Zero)
>             Name (_HID, "EGA00001")  // _HID: Hardware ID
>             Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */)
> 		// _CID: Compatible ID
>             Name (_S0W, 0x04)  // _S0W: S0 Device Wake State
>             Name (SBFB, ResourceTemplate ()
> 
> Signed-off-by: Andreas Helbech Kleist <andreaskleist@gmail.com>

Applied, thank you.
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/exc3000.c b/drivers/input/touchscreen/exc3000.c
index 69eae79e2087..7a52879d8ac3 100644
--- a/drivers/input/touchscreen/exc3000.c
+++ b/drivers/input/touchscreen/exc3000.c
@@ -7,6 +7,7 @@ 
  * minimal implementation based on egalax_ts.c and egalax_i2c.c
  */
 
+#include <linux/acpi.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/device.h>
@@ -454,10 +455,19 @@  static const struct of_device_id exc3000_of_match[] = {
 MODULE_DEVICE_TABLE(of, exc3000_of_match);
 #endif
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id exc3000_acpi_match[] = {
+	{ "EGA00001", .driver_data = (kernel_ulong_t)&exc3000_info[EETI_EXC80H60] },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, exc3000_acpi_match);
+#endif
+
 static struct i2c_driver exc3000_driver = {
 	.driver = {
 		.name	= "exc3000",
 		.of_match_table = of_match_ptr(exc3000_of_match),
+		.acpi_match_table = ACPI_PTR(exc3000_acpi_match),
 	},
 	.id_table	= exc3000_id,
 	.probe_new	= exc3000_probe,