Add 10EC5280 to bmi160_i2c ACPI IDs to allow binding on some devices
authorJesus Gonzalez <jesusmgh@gmail.com>
Wed, 7 Feb 2024 19:55:50 +0000 (20:55 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Feb 2024 16:16:11 +0000 (16:16 +0000)
commitca2f16c315683d9922445b59a738f6e4c168d54d
tree68e0b5fbc21ba38e94c09fc3fe26b1fdd722d1b0
parent89b1b86fc77367fac470258acdf470ffe2edc8d4
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 */
    }

    ...

}

Signed-off-by: Jesus Gonzalez <jesusmgh@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240207195549.37994-2-jesusmgh@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/bmi160/bmi160_i2c.c