Skip to contentSkip to conversation

Add 10EC5280 to bmi160_i2c ACPI IDs to allow binding on some devices

PATCH Superseded Andy Shevchenko 3 participants 9 messages Feb 5, 2024 – Feb 19, 2024 IIO

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines · Jonathan Cameron

On Fri, 2 Feb 2024 18:30:41 +0100
Jesus Gonzalez <[email protected]> wrote:

...

Quoted 5 lines

Review

Quoted 5 lines

static const struct acpi_device_id bmi160_acpi_match[] = {

(quoted diff) +1 -0
 	{"BMI0160", 0},
+	{"10EC5280", 0},
 	{ },
 };

Keep it ordered (digits are going before letters).

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#1 lore raw

PATCH v2 1/1 Add 10EC5280 to bmi160_i2c ACPI IDs to allow binding on some devices

"10EC5280" is used by several manufacturers like Lenovo, GPD, or AYA (and probably others) in their ACPI table as the ID for the bmi160 IMU. This means the bmi160_i2c driver won't bind to it, and the IMU is unavailable to the user. Manufacturers have been approached on several occasions to try getting a BIOS with a fixed ID, mostly without actual positive results, and since affected devices are already a few years old, this is not expected to change. This patch enables using the bmi160_i2c driver for the bmi160 IMU on these devices.

Here is the relevant extract from the DSDT of a GPD Win Max 2 (AMD 6800U model) with the latest firmware 1.05 installed. GPD sees this as WONTFIX with the argument of the device working with the Windows drivers.

     Scope (_SB.I2CC)
    {
        Device (BMA2)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_HID, "10EC5280")  // _HID: Hardware ID
            Name (_CID, "10EC5280")  // _CID: Compatible ID
            Name (_DDN, "Accelerometer")  // _DDN: DOS Device Name
            Name (_UID, One)  // _UID: Unique ID
            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                Name (RBUF, ResourceTemplate ()
                {
                    I2cSerialBusV2 (0x0069, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.I2CC",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                })
                Return (RBUF) /* \_SB_.I2CC.BMA2._CRS.RBUF */
            }

            OperationRegion (CMS2, SystemIO, 0x72, 0x02)
            Field (CMS2, ByteAcc, NoLock, Preserve)
            {
                IND2,   8, 
                DAT2,   8
            }

            IndexField (IND2, DAT2, ByteAcc, NoLock, Preserve)
            {
                Offset (0x74), 
                BACS,   32
            }

            Method (ROMS, 0, NotSerialized)
            {
                Name (RBUF, Package (0x03)
                {
                    "0 -1 0", 
                    "-1 0 0", 
                    "0 0 1"
                })
                Return (RBUF) /* \_SB_.I2CC.BMA2.ROMS.RBUF */
            }

            Method (CALS, 1, NotSerialized)
            {
                Local0 = Arg0
                If (((Local0 == Zero) || (Local0 == Ones)))
                {
                    Return (Local0)
                }
                Else
                {
                    BACS = Local0
                }
            }

            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Return (0x0F)
            }
        }
    }

---
v2 patch implementing the improvements mentioned by Mr. Cameron and Mr. Shevchenko, if I understood them correctly. Please tell me if anything else should be changed, and I'll be happy to make a new revision.

Thank you!

 drivers/iio/imu/bmi160/bmi160_spi.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/iio/imu/bmi160/bmi160_spi.c +8 -0
index 8b573ea99af2..f88d4b2ba79b 100644
@@ -40,6 +40,14 @@ static const struct spi_device_id bmi160_spi_id[] = {
 MODULE_DEVICE_TABLE(spi, bmi160_spi_id);
 
 static const struct acpi_device_id bmi160_acpi_match[] = {
+	/* FIRMWARE BUG WORKAROUND
+	 * Some manufacturers like GPD, Lenovo or Aya used the incorrect
+	 * ID "10EC5280" for bmi160 in their DSDT. A fixed firmware is not
+	 * available as of Feb 2024 after trying to work with OEMs, and
+	 * this is not expected to change anymore since at least some of
+	 * the affected devices are from 2021/2022.
+	 */
+	{"10EC5280", 0},
 	{"BMI0160", 0},
 	{ },
 };
Signature · 1 line
2.43.0
#2 lore raw

On Mon, Feb 05, 2024 at 07:36:20PM +0100, Jesus Gonzalez wrote:

Thank you for the update, my comments below.

First of all, it would be nice also to try to contact with Realtek and make them aware again. Have anybody talked to them previously?

Also read this thread:
https://lore.kernel.org/linux-iio/CACAwPwYQHRcrabw9=0tvenPzAcwwW1pTaR6a+AEWBF9Hqf_wXQ@mail.gmail.com/

Quoted 8 lines

"10EC5280" is used by several manufacturers like Lenovo, GPD, or AYA (and probably others) in their ACPI table as the ID for the bmi160 IMU. This means the bmi160_i2c driver won't bind to it, and the IMU is unavailable to the user. Manufacturers have been approached on several occasions to try getting a BIOS with a fixed ID, mostly without actual positive results, and since affected devices are already a few years old, this is not expected to change. This patch enables using the bmi160_i2c driver for the bmi160 IMU on these devices.

You have trailing whitespaces in each of the line.

Quoted 6 lines

Here is the relevant extract from the DSDT of a GPD Win Max 2 (AMD 6800U model) with the latest firmware 1.05 installed. GPD sees this as WONTFIX with the argument of the device working with the Windows drivers.

     Scope (_SB.I2CC)
    {

Cut off these 2 lines.

Quoted 10 lines
        Device (BMA2)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_HID, "10EC5280")  // _HID: Hardware ID
            Name (_CID, "10EC5280")  // _CID: Compatible ID
            Name (_DDN, "Accelerometer")  // _DDN: DOS Device Name
            Name (_UID, One)  // _UID: Unique ID
            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                Name (RBUF, ResourceTemplate ()
Quoted 8 lines
                {
                    I2cSerialBusV2 (0x0069, ControllerInitiated, 0x00061A80,
                        AddressingMode7Bit, "\\_SB.I2CC",
                        0x00, ResourceConsumer, , Exclusive,
                        )
                })
                Return (RBUF) /* \_SB_.I2CC.BMA2._CRS.RBUF */
            }

Please, cut the below...

Quoted 34 lines
            OperationRegion (CMS2, SystemIO, 0x72, 0x02)
            Field (CMS2, ByteAcc, NoLock, Preserve)
            {
                IND2,   8, 
                DAT2,   8
            }

            IndexField (IND2, DAT2, ByteAcc, NoLock, Preserve)
            {
                Offset (0x74), 
                BACS,   32
            }

            Method (ROMS, 0, NotSerialized)
            {
                Name (RBUF, Package (0x03)
                {
                    "0 -1 0", 
                    "-1 0 0", 
                    "0 0 1"
                })
                Return (RBUF) /* \_SB_.I2CC.BMA2.ROMS.RBUF */
            }

            Method (CALS, 1, NotSerialized)
            {
                Local0 = Arg0
                If (((Local0 == Zero) || (Local0 == Ones)))
                {
                    Return (Local0)
                }
                Else
                {
Quoted 8 lines
                    BACS = Local0
                }
            }

            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Return (0x0F)
            }

...till here. Replace it by ... on a single line.

Quoted 4 lines
        }


    }

As per above (this is part of Scope, so drop it as well).

...

drivers/iio/imu/bmi160/bmi160_spi.c static const struct spi_device_id bmi160_spi_id[] = { · line 50

Quoted 8 lines
drivers/iio/imu/bmi160/bmi160_spi.c +8 -0
+	/* FIRMWARE BUG WORKAROUND
+	 * Some manufacturers like GPD, Lenovo or Aya used the incorrect
+	 * ID "10EC5280" for bmi160 in their DSDT. A fixed firmware is not
+	 * available as of Feb 2024 after trying to work with OEMs, and
+	 * this is not expected to change anymore since at least some of
+	 * the affected devices are from 2021/2022.
+	 */
+	{"10EC5280", 0},

/*
* Please, use the correct style of
* multi-line comments, like in this
* example.
*/

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw

PATCH v3 1/1 Add 10EC5280 to bmi160_i2c ACPI IDs to allow binding on some devices

"10EC5280" is used by several manufacturers like Lenovo, GPD, or AYA (and probably others) in their ACPI table as the ID for the bmi160 IMU. This means the bmi160_i2c driver won't bind to it, and the IMU is unavailable to the user. Manufacturers have been approached on several occasions to try getting a BIOS with a fixed ID, mostly without actual positive results, and since affected devices are already a few years old, this is not expected to change. This patch enables using the bmi160_i2c driver for the bmi160 IMU on these devices.

Here is the relevant extract from the DSDT of a GPD Win Max 2 (AMD 6800U model) with the latest firmware 1.05 installed. GPD sees this as WONTFIX with the argument of the device working with the Windows drivers.

	Device (BMA2)
	{
	    Name (_ADR, Zero)  // _ADR: Address
	    Name (_HID, "10EC5280")  // _HID: Hardware ID
	    Name (_CID, "10EC5280")  // _CID: Compatible ID
	    Name (_DDN, "Accelerometer")  // _DDN: DOS Device Name
	    Name (_UID, One)  // _UID: Unique ID
	    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
	    {
		Name (RBUF, ResourceTemplate ()
		{
		    I2cSerialBusV2 (0x0069, ControllerInitiated, 0x00061A80,
		        AddressingMode7Bit, "\\_SB.I2CC",
		        0x00, ResourceConsumer, , Exclusive,
		        )
		})
		Return (RBUF) /* \_SB_.I2CC.BMA2._CRS.RBUF */
	    }
	    
	    ...
	    
	}

---
v3: - Add ID to the actual i2c driver instead of the spi driver (Mistake while manually transferring change to clean master, lesson learned)
- Move comment to outside of the function as per coding style
- Adapt comment style to standard multi-line comment style
- Reduce unnecessary noise from DSDT in the explanation body

 drivers/iio/imu/bmi160/bmi160_i2c.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/iio/imu/bmi160/bmi160_i2c.c +9 -0
index 81652c08e644..fc72445204e6 100644
@@ -42,7 +42,16 @@ static const struct i2c_device_id bmi160_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, bmi160_i2c_id);
 
+/*
+ * FIRMWARE BUG WORKAROUND: ID "10EC5280"
+ * Some manufacturers like GPD, Lenovo or Aya used the incorrect
+ * ID "10EC5280" for bmi160 in their DSDT. A fixed firmware is not
+ * available as of Feb 2024 after trying to work with OEMs, and
+ * this is not expected to change anymore since at least some of
+ * the affected devices are from 2021/2022.
+ */
 static const struct acpi_device_id bmi160_acpi_match[] = {
+	{"10EC5280", 0},
 	{"BMI0160", 0},
 	{ },
 };
Signature · 1 line
2.43.0
author Reviewed-by on v3 1/1
#4 lore raw
Quoted 35 lines · Jesus Gonzalez

"10EC5280" is used by several manufacturers like Lenovo, GPD, or AYA (and probably others) in their ACPI table as the ID for the bmi160 IMU. This means the bmi160_i2c driver won't bind to it, and the IMU is unavailable to the user. Manufacturers have been approached on several occasions to try getting a BIOS with a fixed ID, mostly without actual positive results, and since affected devices are already a few years old, this is not expected to change. This patch enables using the bmi160_i2c driver for the bmi160 IMU on these devices.

Here is the relevant extract from the DSDT of a GPD Win Max 2 (AMD 6800U model) with the latest firmware 1.05 installed. GPD sees this as WONTFIX with the argument of the device working with the Windows drivers.

	Device (BMA2)
	{
	    Name (_ADR, Zero)  // _ADR: Address
	    Name (_HID, "10EC5280")  // _HID: Hardware ID
	    Name (_CID, "10EC5280")  // _CID: Compatible ID
	    Name (_DDN, "Accelerometer")  // _DDN: DOS Device Name
	    Name (_UID, One)  // _UID: Unique ID
	    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
	    {
		Name (RBUF, ResourceTemplate ()
		{
		    I2cSerialBusV2 (0x0069, ControllerInitiated, 0x00061A80,
		        AddressingMode7Bit, "\\_SB.I2CC",
		        0x00, ResourceConsumer, , Exclusive,
		        )
		})
		Return (RBUF) /* \_SB_.I2CC.BMA2._CRS.RBUF */
	    }
	    
	    ...
	    
	}

...

Quoted 8 lines

+/*
+ * FIRMWARE BUG WORKAROUND: ID "10EC5280"
+ * Some manufacturers like GPD, Lenovo or Aya used the incorrect
+ * ID "10EC5280" for bmi160 in their DSDT. A fixed firmware is not
+ * available as of Feb 2024 after trying to work with OEMs, and
+ * this is not expected to change anymore since at least some of
+ * the affected devices are from 2021/2022.
+ */

The location of the comment is wrong, it should be...

Quoted 1 line

static const struct acpi_device_id bmi160_acpi_match[] = {

...here as you have had it previously. Just make sure it properly formed.

Maybe Jonathan can amend when applying, dunno.

drivers/iio/imu/bmi160/bmi160_i2c.c static const struct i2c_device_id bmi160_i2c_id[] = { · line 56

Quoted 3 lines
drivers/iio/imu/bmi160/bmi160_i2c.c +1 -0
+	{"10EC5280", 0},
 	{"BMI0160", 0},
 	{ },

With the comment in the proper location,

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#5 lore raw

PATCH v4 1/1 Add 10EC5280 to bmi160_i2c ACPI IDs to allow binding on some devices

"10EC5280" is used by several manufacturers like Lenovo, GPD, or AYA (and probably others) in their ACPI table as the ID for the bmi160 IMU. This means the bmi160_i2c driver won't bind to it, and the IMU is unavailable to the user. Manufacturers have been approached on several occasions to try getting a BIOS with a fixed ID, mostly without actual positive results, and since affected devices are already a few years old, this is not expected to change. This patch enables using the bmi160_i2c driver for the bmi160 IMU on these devices.

Here is the relevant extract from the DSDT of a GPD Win Max 2 (AMD 6800U model) with the latest firmware 1.05 installed. GPD sees this as WONTFIX with the argument of the device working with the Windows drivers.

	Device (BMA2)
	{
	    Name (_ADR, Zero)  // _ADR: Address
	    Name (_HID, "10EC5280")  // _HID: Hardware ID
	    Name (_CID, "10EC5280")  // _CID: Compatible ID
	    Name (_DDN, "Accelerometer")  // _DDN: DOS Device Name
	    Name (_UID, One)  // _UID: Unique ID
	    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
	    {
		Name (RBUF, ResourceTemplate ()
		{
		    I2cSerialBusV2 (0x0069, ControllerInitiated, 0x00061A80,
		        AddressingMode7Bit, "\\_SB.I2CC",
		        0x00, ResourceConsumer, , Exclusive,
		        )
		})
		Return (RBUF) /* \_SB_.I2CC.BMA2._CRS.RBUF */
	    }
	    
	    ...
	    
	}

---
v4: Moved comment back to relevant position inside function

 drivers/iio/imu/bmi160/bmi160_i2c.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/iio/imu/bmi160/bmi160_i2c.c +9 -0
index 81652c08e644..a081305254db 100644
@@ -43,6 +43,15 @@ static const struct i2c_device_id bmi160_i2c_id[] = {
 MODULE_DEVICE_TABLE(i2c, bmi160_i2c_id);
 
 static const struct acpi_device_id bmi160_acpi_match[] = {
+	/*
+	 * FIRMWARE BUG WORKAROUND
+	 * Some manufacturers like GPD, Lenovo or Aya used the incorrect
+	 * ID "10EC5280" for bmi160 in their DSDT. A fixed firmware is not
+	 * available as of Feb 2024 after trying to work with OEMs, and
+	 * this is not expected to change anymore since at least some of
+	 * the affected devices are from 2021/2022.
+	 */
+	{"10EC5280", 0},
 	{"BMI0160", 0},
 	{ },
 };
Signature · 1 line
2.43.0
author Reviewed-by on v4 1/1
#6 lore raw
Quoted 27 lines · Jesus Gonzalez

"10EC5280" is used by several manufacturers like Lenovo, GPD, or AYA (and probably others) in their ACPI table as the ID for the bmi160 IMU. This means the bmi160_i2c driver won't bind to it, and the IMU is unavailable to the user. Manufacturers have been approached on several occasions to try getting a BIOS with a fixed ID, mostly without actual positive results, and since affected devices are already a few years old, this is not expected to change. This patch enables using the bmi160_i2c driver for the bmi160 IMU on these devices.

Here is the relevant extract from the DSDT of a GPD Win Max 2 (AMD 6800U model) with the latest firmware 1.05 installed. GPD sees this as WONTFIX with the argument of the device working with the Windows drivers.

	Device (BMA2)
	{
	    Name (_ADR, Zero)  // _ADR: Address
	    Name (_HID, "10EC5280")  // _HID: Hardware ID
	    Name (_CID, "10EC5280")  // _CID: Compatible ID
	    Name (_DDN, "Accelerometer")  // _DDN: DOS Device Name
	    Name (_UID, One)  // _UID: Unique ID
	    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
	    {
		Name (RBUF, ResourceTemplate ()
		{
		    I2cSerialBusV2 (0x0069, ControllerInitiated, 0x00061A80,
		        AddressingMode7Bit, "\\_SB.I2CC",
		        0x00, ResourceConsumer, , Exclusive,
Quoted 8 lines
		        )
		})
		Return (RBUF) /* \_SB_.I2CC.BMA2._CRS.RBUF */
	    }
	    
	    ...
	    
	}

(It's your responsibility to carry on the tags you got in case you send a new
version. But for the sake of constructive feedback I'll give it once more this time, so no need to send a new version.)

Quoted 30 lines

---
v4: Moved comment back to relevant position inside function

 drivers/iio/imu/bmi160/bmi160_i2c.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/iio/imu/bmi160/bmi160_i2c.c +9 -0
index 81652c08e644..a081305254db 100644
@@ -43,6 +43,15 @@ static const struct i2c_device_id bmi160_i2c_id[] = {
 MODULE_DEVICE_TABLE(i2c, bmi160_i2c_id);
 
 static const struct acpi_device_id bmi160_acpi_match[] = {
+	/*
+	 * FIRMWARE BUG WORKAROUND
+	 * Some manufacturers like GPD, Lenovo or Aya used the incorrect
+	 * ID "10EC5280" for bmi160 in their DSDT. A fixed firmware is not
+	 * available as of Feb 2024 after trying to work with OEMs, and
+	 * this is not expected to change anymore since at least some of
+	 * the affected devices are from 2021/2022.
+	 */
+	{"10EC5280", 0},
 	{"BMI0160", 0},
 	{ },
 };
Signature · 1 line
2.43.0
Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#7 lore raw
In reply to Jesus Gonzalez
Quoted 36 lines · On Wed, 7 Feb 2024 20:55:50 +0100 Jesus Gonzalez <[email protected]> wrote:

"10EC5280" is used by several manufacturers like Lenovo, GPD, or AYA (and probably others) in their ACPI table as the ID for the bmi160 IMU. This means the bmi160_i2c driver won't bind to it, and the IMU is unavailable to the user. Manufacturers have been approached on several occasions to try getting a BIOS with a fixed ID, mostly without actual positive results, and since affected devices are already a few years old, this is not expected to change. This patch enables using the bmi160_i2c driver for the bmi160 IMU on these devices.

Here is the relevant extract from the DSDT of a GPD Win Max 2 (AMD 6800U model) with the latest firmware 1.05 installed. GPD sees this as WONTFIX with the argument of the device working with the Windows drivers.

	Device (BMA2)
	{
	    Name (_ADR, Zero)  // _ADR: Address
	    Name (_HID, "10EC5280")  // _HID: Hardware ID
	    Name (_CID, "10EC5280")  // _CID: Compatible ID
	    Name (_DDN, "Accelerometer")  // _DDN: DOS Device Name
	    Name (_UID, One)  // _UID: Unique ID
	    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
	    {
		Name (RBUF, ResourceTemplate ()
		{
		    I2cSerialBusV2 (0x0069, ControllerInitiated, 0x00061A80,
		        AddressingMode7Bit, "\\_SB.I2CC",
		        0x00, ResourceConsumer, , Exclusive,
		        )
		})
		Return (RBUF) /* \_SB_.I2CC.BMA2._CRS.RBUF */
	    }
	    
	    ...
	    
	}
Quoted 1 line

For future reference don't send a new version in reply to the old one. It makes a big mess in many people's email clients
if we get lots of versions. The patch naming is enough to associate the different versions.

Applied to the togreg branch of iio.git and pushed out as testing for 0-day to take a look at it.

Thanks,

Jonathan

Quoted 26 lines

---
v4: Moved comment back to relevant position inside function

 drivers/iio/imu/bmi160/bmi160_i2c.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/iio/imu/bmi160/bmi160_i2c.c +9 -0
index 81652c08e644..a081305254db 100644
@@ -43,6 +43,15 @@ static const struct i2c_device_id bmi160_i2c_id[] = {
 MODULE_DEVICE_TABLE(i2c, bmi160_i2c_id);
 
 static const struct acpi_device_id bmi160_acpi_match[] = {
+	/*
+	 * FIRMWARE BUG WORKAROUND
+	 * Some manufacturers like GPD, Lenovo or Aya used the incorrect
+	 * ID "10EC5280" for bmi160 in their DSDT. A fixed firmware is not
+	 * available as of Feb 2024 after trying to work with OEMs, and
+	 * this is not expected to change anymore since at least some of
+	 * the affected devices are from 2021/2022.
+	 */
+	{"10EC5280", 0},
 	{"BMI0160", 0},
 	{ },
 };
#8 lore raw

Please excuse the late answer.

Thank you both, Mr. Cameron and Mr. Shevchenko, for guiding me through this.

I'll keep an eye on git, and make sure to remember your advice on any future submissions.

Best regards,

Jesus Gonzalez

Quoted 75 lines
Quoted 36 lines

"10EC5280" is used by several manufacturers like Lenovo, GPD, or AYA (and probably others) in their ACPI table as the ID for the bmi160 IMU. This means the bmi160_i2c driver won't bind to it, and the IMU is unavailable to the user. Manufacturers have been approached on several occasions to try getting a BIOS with a fixed ID, mostly without actual positive results, and since affected devices are already a few years old, this is not expected to change. This patch enables using the bmi160_i2c driver for the bmi160 IMU on these devices.

Here is the relevant extract from the DSDT of a GPD Win Max 2 (AMD 6800U model) with the latest firmware 1.05 installed. GPD sees this as WONTFIX with the argument of the device working with the Windows drivers.

	Device (BMA2)
	{
	    Name (_ADR, Zero)  // _ADR: Address
	    Name (_HID, "10EC5280")  // _HID: Hardware ID
	    Name (_CID, "10EC5280")  // _CID: Compatible ID
	    Name (_DDN, "Accelerometer")  // _DDN: DOS Device Name
	    Name (_UID, One)  // _UID: Unique ID
	    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
	    {
		Name (RBUF, ResourceTemplate ()
		{
		    I2cSerialBusV2 (0x0069, ControllerInitiated, 0x00061A80,
		        AddressingMode7Bit, "\\_SB.I2CC",
		        0x00, ResourceConsumer, , Exclusive,
		        )
		})
		Return (RBUF) /* \_SB_.I2CC.BMA2._CRS.RBUF */
	    }
	
	    ...
	
	}
Quoted 1 line

For future reference don't send a new version in reply to the old one. It makes a big mess in many people's email clients
if we get lots of versions. The patch naming is enough to associate the different versions.

Applied to the togreg branch of iio.git and pushed out as testing for 0-day to take a look at it.

Thanks,

Jonathan

Quoted 26 lines

---
v4: Moved comment back to relevant position inside function

  drivers/iio/imu/bmi160/bmi160_i2c.c | 9 +++++++++
  1 file changed, 9 insertions(+)
drivers/iio/imu/bmi160/bmi160_i2c.c +9 -0
index 81652c08e644..a081305254db 100644
@@ -43,6 +43,15 @@ static const struct i2c_device_id bmi160_i2c_id[] = {
  MODULE_DEVICE_TABLE(i2c, bmi160_i2c_id);
 
  static const struct acpi_device_id bmi160_acpi_match[] = {
+	/*
+	 * FIRMWARE BUG WORKAROUND
+	 * Some manufacturers like GPD, Lenovo or Aya used the incorrect
+	 * ID "10EC5280" for bmi160 in their DSDT. A fixed firmware is not
+	 * available as of Feb 2024 after trying to work with OEMs, and
+	 * this is not expected to change anymore since at least some of
+	 * the affected devices are from 2021/2022.
+	 */
+	{"10EC5280", 0},
  	{"BMI0160", 0},
  	{ },
  };