[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAd53p6tjWtKSqDDG_hjbFGKeR7-L3uYwgOTRNHfwAhmE8nV+g@mail.gmail.com>
Date: Tue, 15 Feb 2022 19:30:10 +0800
From: Kai-Heng Feng <kai.heng.feng@...onical.com>
To: Andy Shevchenko <andy.shevchenko@...il.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 4:28 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> 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?
I was uncertain on this at first, but later I saw some drivers use
this form (*:00) too, so I just followed through.
The intention is to accommodate adxl345_i2c_probe() without any modification.
>
> Just don't add anything to this table.
Got it.
>
> The rest is good, but consider doing the same for _spi part of the driver.
OK, will do.
Kai-Heng
>
> --
> With Best Regards,
> Andy Shevchenko
Powered by blists - more mailing lists