* [PATCH v2] Input: adxl34x: Add ACPI HID table
@ 2022-01-28 5:56 Kai-Heng Feng
2022-01-28 14:01 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Kai-Heng Feng @ 2022-01-28 5:56 UTC (permalink / raw)
To: dmitry.torokhov
Cc: andy.shevchenko, Kai-Heng Feng, Uwe Kleine-König,
linux-input, linux-kernel
x86 boards may use ACPI HID "ADS0345" for adxl34x device.
Analog replied:
"ADS034X is not a valid PNP ID. ADS0345 would be.
I'm not aware that this ID is already taken.
Feel free to submit a mainline Linux input mailing list patch."
So add an ACPI match table for that accordingly.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
v2:
- Drop ACPI_PTR()
- Drop redundant empty line and comma
- Add info from vendor
drivers/input/misc/adxl34x-i2c.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/input/misc/adxl34x-i2c.c b/drivers/input/misc/adxl34x-i2c.c
index a3b5f88d2bd16..b9af581cde800 100644
--- a/drivers/input/misc/adxl34x-i2c.c
+++ b/drivers/input/misc/adxl34x-i2c.c
@@ -155,11 +155,18 @@ static const struct of_device_id adxl34x_of_id[] = {
MODULE_DEVICE_TABLE(of, adxl34x_of_id);
+static const struct acpi_device_id 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 = adxl34x_acpi_match,
},
.probe = adxl34x_i2c_probe,
.remove = adxl34x_i2c_remove,
--
2.33.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Input: adxl34x: Add ACPI HID table
2022-01-28 5:56 [PATCH v2] Input: adxl34x: Add ACPI HID table Kai-Heng Feng
@ 2022-01-28 14:01 ` Andy Shevchenko
2022-01-28 14:05 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2022-01-28 14:01 UTC (permalink / raw)
To: Kai-Heng Feng
Cc: Dmitry Torokhov, Uwe Kleine-König, linux-input,
Linux Kernel Mailing List
On Fri, Jan 28, 2022 at 7:56 AM Kai-Heng Feng
<kai.heng.feng@canonical.com> wrote:
>
> x86 boards may use ACPI HID "ADS0345" for adxl34x device.
the adxl34x
> Analog replied:
> "ADS034X is not a valid PNP ID. ADS0345 would be.
> I'm not aware that this ID is already taken.
> Feel free to submit a mainline Linux input mailing list patch."
>
> So add an ACPI match table for that accordingly.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Thanks!
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> v2:
> - Drop ACPI_PTR()
> - Drop redundant empty line and comma
> - Add info from vendor
>
> drivers/input/misc/adxl34x-i2c.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/input/misc/adxl34x-i2c.c b/drivers/input/misc/adxl34x-i2c.c
> index a3b5f88d2bd16..b9af581cde800 100644
> --- a/drivers/input/misc/adxl34x-i2c.c
> +++ b/drivers/input/misc/adxl34x-i2c.c
> @@ -155,11 +155,18 @@ static const struct of_device_id adxl34x_of_id[] = {
>
> MODULE_DEVICE_TABLE(of, adxl34x_of_id);
>
> +static const struct acpi_device_id 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 = adxl34x_acpi_match,
> },
> .probe = adxl34x_i2c_probe,
> .remove = adxl34x_i2c_remove,
> --
> 2.33.1
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Input: adxl34x: Add ACPI HID table
2022-01-28 14:01 ` Andy Shevchenko
@ 2022-01-28 14:05 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-01-28 14:05 UTC (permalink / raw)
To: Kai-Heng Feng
Cc: Dmitry Torokhov, Uwe Kleine-König, linux-input,
Linux Kernel Mailing List
On Fri, Jan 28, 2022 at 4:01 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Fri, Jan 28, 2022 at 7:56 AM Kai-Heng Feng
> <kai.heng.feng@canonical.com> wrote:
...
> > drivers/input/misc/adxl34x-i2c.c | 7 +++++++
Hold on, why in this driver and not
drivers/iio/accel/adxl345_i2c.c
drivers/iio/accel/adxl345_spi.c
?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-28 14:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 5:56 [PATCH v2] Input: adxl34x: Add ACPI HID table Kai-Heng Feng
2022-01-28 14:01 ` Andy Shevchenko
2022-01-28 14:05 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).