Re: [PATCH v1 1/1] iio: gyro: bmg160: Drop most likely fake ACPI IDs

From: Hans de Goede
Date: Sat Oct 19 2024 - 06:34:10 EST


Hi,

On 18-Oct-24 4:57 PM, Andy Shevchenko wrote:
> The commits in question do not proove that ACPI IDs exist.
> Quite likely it was a cargo cult addition while doing that
> for DT-based enumeration. Drop most likely fake ACPI IDs.
>
> The to be removed IDs has been checked against the following resources:
> 1) DuckDuckGo
> 2) Google
> 3) MS catalog: https://www.catalog.update.microsoft.com/Search.aspx
> This gives no useful results in regard to DSDT, moreover, the official
> vendor IDs in the registry for Bosh are BSG and BOSC.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> drivers/iio/gyro/bmg160_i2c.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c
> index 672d0b720f61..a81814df5205 100644
> --- a/drivers/iio/gyro/bmg160_i2c.c
> +++ b/drivers/iio/gyro/bmg160_i2c.c
> @@ -39,8 +39,6 @@ static void bmg160_i2c_remove(struct i2c_client *client)
>
> static const struct acpi_device_id bmg160_acpi_match[] = {
> {"BMG0160", 0},
> - {"BMI055B", 0},
> - {"BMI088B", 0},
> {},
> };
>

Doing a grep on my acpidump collection shows that the BMI prefix is used
for some Bosch IMU-s. It seems that some of the Bosch ACPI HID
prefixes are like this:

Bosch Measurement Accel -> BMAxxxx
Bosch Measurement Gyro -> BMGxxxx
Bosch Measurement IMU -> BMIxxxx

In itself these 3 non official vendor prefixis seem to be quite
wildly used and such are not an indication that a HID is not in use.

But using BMI which is for IMU-s in a non IMU driver is suspect.
Note that has Jonathan has pointed out there is a valid BMI0160
HID used by the drivers/iio/imu/bmi160/ code.

I also notice a "BMI055A" HID in the bmc150-accel-[i2c|spi].c drivers,
which seems equally wrong.

It seems that if anything there should be a "BMI055" (no suffix) HID
for drivers/iio/imu/bno055/bno055_i2c.c, but we should only add that
if we actually encounter it in the wild.

TL;DR:

I agree with the removal of the "BMI055B" and "BMI088B" ACPI HIDs
from this driver, because if these are valid for anything they
are valid for the bno055 + some unknown 088 IMU drivers and not
for a gyro driver.

Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>

Regards,

Hans