Re: [PATCH 4/4] iio: accel: bmc150: Add support for BMC156
From: Linus Walleij <hidden>
Date: 2021-07-19 14:08:33
Also in:
linux-iio
From: Linus Walleij <hidden>
Date: 2021-07-19 14:08:33
Also in:
linux-iio
On Mon, Jul 19, 2021 at 1:26 PM Stephan Gerhold [off-list ref] wrote:
BMC156 is another accelerometer that works just fine with the bmc150-accel
driver. It's very similar to BMC150 (also a accelerometer+magnetometer
combo) but with only one accelerometer interrupt pin. It would make sense
if only INT1 was exposed but someone at Bosch was crazy and decided to only
have an INT2 pin.
Try to deal with this by making use of the INT2 support introduced
in the previous commit and force using INT2 for BMC156. To detect
that we need to bring up a simplified version of the previous type IDs.
Note that unlike the type IDs removed in commit c06a6aba6835
("iio: accel: bmc150: Drop misleading/duplicate chip identifiers")
here I only add one for the special case of BMC156. Everything else
still happens by reading the CHIP_ID register since the chip type
information often is not accurate in ACPI tables.
Tested-by: Nikita Travkin <redacted> # BMC156
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>Reviewed-by: Linus Walleij <redacted> Yours, Linus Walleij