* [PATCH v1 1/1] iio: imu: kmx61: Drop most likely fake ACPI ID
@ 2024-09-11 21:31 Andy Shevchenko
2024-09-12 13:52 ` Hans de Goede
0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2024-09-11 21:31 UTC (permalink / raw)
To: Andy Shevchenko, linux-iio, linux-kernel
Cc: Jonathan Cameron, Lars-Peter Clausen, Ilpo Järvinen,
Hans de Goede
The commit in question does not proove that ACPI ID exists.
Quite likely it was a cargo cult addition while doint that
for DT-based enumeration. Drop most likely fake ACPI ID.
Googling for KMX61021L gives no useful results in regard to DSDT.
Moreover, the official vendor ID in the registry for Kionix is KIOX.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/iio/imu/kmx61.c | 25 +++----------------------
1 file changed, 3 insertions(+), 22 deletions(-)
diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c
index c61c012e25bb..2af772775b68 100644
--- a/drivers/iio/imu/kmx61.c
+++ b/drivers/iio/imu/kmx61.c
@@ -7,12 +7,13 @@
* IIO driver for KMX61 (7-bit I2C slave address 0x0E or 0x0F).
*/
-#include <linux/module.h>
#include <linux/i2c.h>
-#include <linux/acpi.h>
#include <linux/interrupt.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
+
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/events.h>
@@ -1217,16 +1218,6 @@ static irqreturn_t kmx61_trigger_handler(int irq, void *p)
return IRQ_HANDLED;
}
-static const char *kmx61_match_acpi_device(struct device *dev)
-{
- const struct acpi_device_id *id;
-
- id = acpi_match_device(dev->driver->acpi_match_table, dev);
- if (!id)
- return NULL;
- return dev_name(dev);
-}
-
static struct iio_dev *kmx61_indiodev_setup(struct kmx61_data *data,
const struct iio_info *info,
const struct iio_chan_spec *chan,
@@ -1293,8 +1284,6 @@ static int kmx61_probe(struct i2c_client *client)
if (id)
name = id->name;
- else if (ACPI_HANDLE(&client->dev))
- name = kmx61_match_acpi_device(&client->dev);
else
return -ENODEV;
@@ -1496,13 +1485,6 @@ static const struct dev_pm_ops kmx61_pm_ops = {
RUNTIME_PM_OPS(kmx61_runtime_suspend, kmx61_runtime_resume, NULL)
};
-static const struct acpi_device_id kmx61_acpi_match[] = {
- {"KMX61021", 0},
- {}
-};
-
-MODULE_DEVICE_TABLE(acpi, kmx61_acpi_match);
-
static const struct i2c_device_id kmx61_id[] = {
{ "kmx611021" },
{}
@@ -1513,7 +1495,6 @@ MODULE_DEVICE_TABLE(i2c, kmx61_id);
static struct i2c_driver kmx61_driver = {
.driver = {
.name = KMX61_DRV_NAME,
- .acpi_match_table = kmx61_acpi_match,
.pm = pm_ptr(&kmx61_pm_ops),
},
.probe = kmx61_probe,
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/1] iio: imu: kmx61: Drop most likely fake ACPI ID
2024-09-11 21:31 [PATCH v1 1/1] iio: imu: kmx61: Drop most likely fake ACPI ID Andy Shevchenko
@ 2024-09-12 13:52 ` Hans de Goede
2024-09-13 9:32 ` Andy Shevchenko
0 siblings, 1 reply; 6+ messages in thread
From: Hans de Goede @ 2024-09-12 13:52 UTC (permalink / raw)
To: Andy Shevchenko, linux-iio, linux-kernel
Cc: Jonathan Cameron, Lars-Peter Clausen, Ilpo Järvinen
Hi,
On 9/11/24 11:31 PM, Andy Shevchenko wrote:
> The commit in question does not proove that ACPI ID exists.
> Quite likely it was a cargo cult addition while doint that
> for DT-based enumeration. Drop most likely fake ACPI ID.
>
> Googling for KMX61021L gives no useful results in regard to DSDT.
> Moreover, the official vendor ID in the registry for Kionix is KIOX.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/iio/imu/kmx61.c | 25 +++----------------------
> 1 file changed, 3 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c
> index c61c012e25bb..2af772775b68 100644
> --- a/drivers/iio/imu/kmx61.c
> +++ b/drivers/iio/imu/kmx61.c
> @@ -7,12 +7,13 @@
> * IIO driver for KMX61 (7-bit I2C slave address 0x0E or 0x0F).
> */
>
> -#include <linux/module.h>
> #include <linux/i2c.h>
> -#include <linux/acpi.h>
> #include <linux/interrupt.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> #include <linux/pm.h>
> #include <linux/pm_runtime.h>
> +
> #include <linux/iio/iio.h>
> #include <linux/iio/sysfs.h>
> #include <linux/iio/events.h>
> @@ -1217,16 +1218,6 @@ static irqreturn_t kmx61_trigger_handler(int irq, void *p)
> return IRQ_HANDLED;
> }
>
> -static const char *kmx61_match_acpi_device(struct device *dev)
> -{
> - const struct acpi_device_id *id;
> -
> - id = acpi_match_device(dev->driver->acpi_match_table, dev);
> - if (!id)
> - return NULL;
> - return dev_name(dev);
> -}
> -
> static struct iio_dev *kmx61_indiodev_setup(struct kmx61_data *data,
> const struct iio_info *info,
> const struct iio_chan_spec *chan,
> @@ -1293,8 +1284,6 @@ static int kmx61_probe(struct i2c_client *client)
>
> if (id)
> name = id->name;
> - else if (ACPI_HANDLE(&client->dev))
> - name = kmx61_match_acpi_device(&client->dev);
> else
> return -ENODEV;
>
> @@ -1496,13 +1485,6 @@ static const struct dev_pm_ops kmx61_pm_ops = {
> RUNTIME_PM_OPS(kmx61_runtime_suspend, kmx61_runtime_resume, NULL)
> };
>
> -static const struct acpi_device_id kmx61_acpi_match[] = {
> - {"KMX61021", 0},
> - {}
> -};
> -
> -MODULE_DEVICE_TABLE(acpi, kmx61_acpi_match);
> -
> static const struct i2c_device_id kmx61_id[] = {
> { "kmx611021" },
> {}
> @@ -1513,7 +1495,6 @@ MODULE_DEVICE_TABLE(i2c, kmx61_id);
> static struct i2c_driver kmx61_driver = {
> .driver = {
> .name = KMX61_DRV_NAME,
> - .acpi_match_table = kmx61_acpi_match,
> .pm = pm_ptr(&kmx61_pm_ops),
> },
> .probe = kmx61_probe,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/1] iio: imu: kmx61: Drop most likely fake ACPI ID
2024-09-12 13:52 ` Hans de Goede
@ 2024-09-13 9:32 ` Andy Shevchenko
2024-09-14 13:47 ` Hans de Goede
2024-09-14 14:26 ` Jonathan Cameron
0 siblings, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2024-09-13 9:32 UTC (permalink / raw)
To: Hans de Goede
Cc: linux-iio, linux-kernel, Jonathan Cameron, Lars-Peter Clausen,
Ilpo Järvinen
On Thu, Sep 12, 2024 at 03:52:34PM +0200, Hans de Goede wrote:
> Hi,
>
> On 9/11/24 11:31 PM, Andy Shevchenko wrote:
> > The commit in question does not proove that ACPI ID exists.
> > Quite likely it was a cargo cult addition while doint that
> > for DT-based enumeration. Drop most likely fake ACPI ID.
> >
> > Googling for KMX61021L gives no useful results in regard to DSDT.
> > Moreover, the official vendor ID in the registry for Kionix is KIOX.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Thanks, patch looks good to me:
Same Q here.
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
And thank you for the reviews!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/1] iio: imu: kmx61: Drop most likely fake ACPI ID
2024-09-13 9:32 ` Andy Shevchenko
@ 2024-09-14 13:47 ` Hans de Goede
2024-09-16 10:02 ` Andy Shevchenko
2024-09-14 14:26 ` Jonathan Cameron
1 sibling, 1 reply; 6+ messages in thread
From: Hans de Goede @ 2024-09-14 13:47 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-iio, linux-kernel, Jonathan Cameron, Lars-Peter Clausen,
Ilpo Järvinen
Hi,
On 9/13/24 11:32 AM, Andy Shevchenko wrote:
> On Thu, Sep 12, 2024 at 03:52:34PM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 9/11/24 11:31 PM, Andy Shevchenko wrote:
>>> The commit in question does not proove that ACPI ID exists.
>>> Quite likely it was a cargo cult addition while doint that
>>> for DT-based enumeration. Drop most likely fake ACPI ID.
>>>
>>> Googling for KMX61021L gives no useful results in regard to DSDT.
>>> Moreover, the official vendor ID in the registry for Kionix is KIOX.
>>>
>>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>
>> Thanks, patch looks good to me:
>
> Same Q here.
Yes I did look for KMX61021 in my DSDT collection and I did
not find anything, neither does:
https://www.catalog.update.microsoft.com/Search.aspx?q=kmx61021
find anything.
So I believe that this one can really be dropped.
Regards,
Hans
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/1] iio: imu: kmx61: Drop most likely fake ACPI ID
2024-09-13 9:32 ` Andy Shevchenko
2024-09-14 13:47 ` Hans de Goede
@ 2024-09-14 14:26 ` Jonathan Cameron
1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2024-09-14 14:26 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Hans de Goede, linux-iio, linux-kernel, Lars-Peter Clausen,
Ilpo Järvinen
On Fri, 13 Sep 2024 12:32:14 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> On Thu, Sep 12, 2024 at 03:52:34PM +0200, Hans de Goede wrote:
> > Hi,
> >
> > On 9/11/24 11:31 PM, Andy Shevchenko wrote:
> > > The commit in question does not proove that ACPI ID exists.
> > > Quite likely it was a cargo cult addition while doint that
> > > for DT-based enumeration. Drop most likely fake ACPI ID.
> > >
> > > Googling for KMX61021L gives no useful results in regard to DSDT.
> > > Moreover, the official vendor ID in the registry for Kionix is KIOX.
> > >
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >
> > Thanks, patch looks good to me:
>
> Same Q here.
In meantime I've queued it up. Can always drop it again
if it turns out we do have users.
Jonathan
>
> > Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>
> And thank you for the reviews!
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/1] iio: imu: kmx61: Drop most likely fake ACPI ID
2024-09-14 13:47 ` Hans de Goede
@ 2024-09-16 10:02 ` Andy Shevchenko
0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2024-09-16 10:02 UTC (permalink / raw)
To: Hans de Goede
Cc: linux-iio, linux-kernel, Jonathan Cameron, Lars-Peter Clausen,
Ilpo Järvinen
On Sat, Sep 14, 2024 at 03:47:21PM +0200, Hans de Goede wrote:
> On 9/13/24 11:32 AM, Andy Shevchenko wrote:
> > On Thu, Sep 12, 2024 at 03:52:34PM +0200, Hans de Goede wrote:
> >> On 9/11/24 11:31 PM, Andy Shevchenko wrote:
...
> > Same Q here.
>
> Yes I did look for KMX61021 in my DSDT collection and I did
> not find anything, neither does:
>
> https://www.catalog.update.microsoft.com/Search.aspx?q=kmx61021
>
> find anything.
Thanks for checking!
> So I believe that this one can really be dropped.
Good. I'm on the side here to drop and look for bug reports rather than
keeping and provoke using badly invented ACPI IDs (as we see already
in the example of ltr501).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-09-16 10:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-11 21:31 [PATCH v1 1/1] iio: imu: kmx61: Drop most likely fake ACPI ID Andy Shevchenko
2024-09-12 13:52 ` Hans de Goede
2024-09-13 9:32 ` Andy Shevchenko
2024-09-14 13:47 ` Hans de Goede
2024-09-16 10:02 ` Andy Shevchenko
2024-09-14 14:26 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox