[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfBQPgrbuxazuoyDbFtGZR=rU5wqPhSXhkoiA_2HR1EHA@mail.gmail.com>
Date: Tue, 15 Feb 2022 10:27:37 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Kai-Heng Feng <kai.heng.feng@...onical.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
linux-iio <linux-iio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] iio: accel: adxl345: Add ACPI HID table
On Tue, Feb 15, 2022 at 6:20 AM Kai-Heng Feng
<kai.heng.feng@...onical.com> wrote:
>
> x86 boards may use ACPI HID "ADS0345" for adxl345 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.
Thank you for the update, my comments below.
...
> @@ -41,6 +41,7 @@ static int adxl345_i2c_probe(struct i2c_client *client,
> static const struct i2c_device_id adxl345_i2c_id[] = {
> { "adxl345", ADXL345 },
> { "adxl375", ADXL375 },
> + { "ADS0345:00", ADXL345 },
> { }
> };
>
This is wrong. First of all, on the left side you put the device
instance name (which must not be in the ID tables, since the device
instance name is "ID + instance number"). Second, the motivation of
this is not clear, if the device is enumerated by ACPI, why do you
care about board code?
Just don't add anything to this table.
The rest is good, but consider doing the same for _spi part of the driver.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists