diff options
author | Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | 2017-06-19 22:04:30 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-07-01 10:16:37 +0100 |
commit | 45a4e4220bf4927e321e18750e47c576bf62b000 (patch) | |
tree | b2a165357b3364e100d3f6bec86da9fcf9a1d922 /drivers/iio/gyro/st_gyro_i2c.c | |
parent | 1911f48de0d90b30a424906b7343b20dac90e3d9 (diff) | |
download | blackbird-obmc-linux-45a4e4220bf4927e321e18750e47c576bf62b000.tar.gz blackbird-obmc-linux-45a4e4220bf4927e321e18750e47c576bf62b000.zip |
iio: gyro: st_gyro: fix L3GD20H support
Add proper support for L3GD20H gyroscope sensor. In particular:
- use L3GD20H as device name instead of L3GD20
- fix available full scales
- fix available sample frequencies
Note that the original patch listed first below introduced broken support for
this part. The second patch drops the support as it didn't work.
This new patch brings in working support.
Fixes: 9444a300c2be (IIO: Add support for L3GD20H gyroscope)
Fixes: a0657716416f ("iio:gyro: bug on L3GD20H gyroscope support")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/gyro/st_gyro_i2c.c')
-rw-r--r-- | drivers/iio/gyro/st_gyro_i2c.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iio/gyro/st_gyro_i2c.c b/drivers/iio/gyro/st_gyro_i2c.c index 40056b821036..3f628746cb93 100644 --- a/drivers/iio/gyro/st_gyro_i2c.c +++ b/drivers/iio/gyro/st_gyro_i2c.c @@ -41,6 +41,10 @@ static const struct of_device_id st_gyro_of_match[] = { .data = L3GD20_GYRO_DEV_NAME, }, { + .compatible = "st,l3gd20h-gyro", + .data = L3GD20H_GYRO_DEV_NAME, + }, + { .compatible = "st,l3g4is-gyro", .data = L3G4IS_GYRO_DEV_NAME, }, @@ -95,6 +99,7 @@ static const struct i2c_device_id st_gyro_id_table[] = { { LSM330DL_GYRO_DEV_NAME }, { LSM330DLC_GYRO_DEV_NAME }, { L3GD20_GYRO_DEV_NAME }, + { L3GD20H_GYRO_DEV_NAME }, { L3G4IS_GYRO_DEV_NAME }, { LSM330_GYRO_DEV_NAME }, { LSM9DS0_GYRO_DEV_NAME }, |