iio:accel:bmc150-accel: Use the chip ID to detect sensor variant
authorBastien Nocera <hadess@hadess.net>
Thu, 23 Jul 2015 15:21:07 +0000 (17:21 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 8 Aug 2015 15:36:46 +0000 (16:36 +0100)
commit0ad4bf37017621e25fe157fa095fd8849779a873
treee3d4b9689b9c183883115b47da80c2c36bd54e2c
parentc4eaab798bd459f0c3f8917e74abf1851f3e1cb5
iio:accel:bmc150-accel: Use the chip ID to detect sensor variant

Instead of using the I2C or ACPI ID to determine which variant of
the chipset to use, determine that from the chip ID.

Under Windows, the same driver is used for those variants and, despite
incorrect ACPI data, it is able to load and operate the accelerometer.

Fixes the accelerometer failing with:
bmc150_accel i2c-BMA250E:00: Invalid chip f8
on the WinBook TW100

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/bmc150-accel.c