]> git.baikalelectronics.ru Git - kernel.git/commit
iio: gyro: mpu3050: fix chip ID reading
authorSergey Larin <cerg2010cerg2010@mail.ru>
Sat, 2 Mar 2019 16:54:55 +0000 (19:54 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 9 Mar 2019 16:55:06 +0000 (16:55 +0000)
commit4474bfbfab841f147cae2199c458e17df28a8206
tree084c49217097ed8718ee04bff5e4a67d59b077e7
parent8fa9aadb43e8256608aa0a35050a88b10753a891
iio: gyro: mpu3050: fix chip ID reading

According to the datasheet, the last bit of CHIP_ID register controls
I2C bus, and the first one is unused. Handle this correctly.

Note that there are chips out there that have a value such that
the id check currently fails.

Signed-off-by: Sergey Larin <cerg2010cerg2010@mail.ru>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/gyro/mpu3050-core.c