[PATCH] Input: adxl34x: Add ACPI HID table

Kai-Heng Feng posted 1 patch 4 years, 5 months ago
drivers/input/misc/adxl34x-i2c.c | 8 ++++++++
1 file changed, 8 insertions(+)
[PATCH] Input: adxl34x: Add ACPI HID table
Posted by Kai-Heng Feng 4 years, 5 months ago
x86 boards may use ACPI HID "ADS0345" to for adxl34x device.

So add an ACPI match table for that accordingly.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/input/misc/adxl34x-i2c.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/input/misc/adxl34x-i2c.c b/drivers/input/misc/adxl34x-i2c.c
index a3b5f88d2bd16..a0b61598204db 100644
--- a/drivers/input/misc/adxl34x-i2c.c
+++ b/drivers/input/misc/adxl34x-i2c.c
@@ -155,11 +155,19 @@ static const struct of_device_id adxl34x_of_id[] = {
 
 MODULE_DEVICE_TABLE(of, adxl34x_of_id);
 
+static const struct acpi_device_id __maybe_unused adxl34x_acpi_match[] = {
+	{ "ADS0345" },
+	{ },
+};
+
+MODULE_DEVICE_TABLE(acpi, adxl34x_acpi_match);
+
 static struct i2c_driver adxl34x_driver = {
 	.driver = {
 		.name = "adxl34x",
 		.pm = &adxl34x_i2c_pm,
 		.of_match_table = adxl34x_of_id,
+		.acpi_match_table = ACPI_PTR(adxl34x_acpi_match),
 	},
 	.probe    = adxl34x_i2c_probe,
 	.remove   = adxl34x_i2c_remove,
-- 
2.33.1

Re: [PATCH] Input: adxl34x: Add ACPI HID table
Posted by Andy Shevchenko 4 years, 5 months ago
On Thu, Jan 6, 2022 at 7:38 AM Kai-Heng Feng
<kai.heng.feng@canonical.com> wrote:
>
> x86 boards may use ACPI HID "ADS0345" to for adxl34x device.
>
> So add an ACPI match table for that accordingly.

All the same comments as per hdc100x patch.

-- 
With Best Regards,
Andy Shevchenko