aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis CIOCCA <denis.ciocca@st.com>2014-02-14 09:15:00 -0500
committerJonathan Cameron <jic23@kernel.org>2014-02-18 05:24:49 -0500
commita0657716416f834ef7710a9044614d50a36c3bdc (patch)
tree17a2d01576440f254dbe9d2beea8ad2d81bf971c
parent1463a166b4eafc654874528ba5e2f66dbdfb8048 (diff)
iio:gyro: bug on L3GD20H gyroscope support
The driver was not able to manage the sensor: during probe function and wai check, the driver stops and writes: "device name and WhoAmI mismatch." The correct value of L3GD20H wai is 0xd7 instead of 0xd4. Dropped support for the sensor. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/gyro/Kconfig2
-rw-r--r--drivers/iio/gyro/st_gyro.h1
-rw-r--r--drivers/iio/gyro/st_gyro_core.c9
-rw-r--r--drivers/iio/gyro/st_gyro_i2c.c1
-rw-r--r--drivers/iio/gyro/st_gyro_spi.c1
5 files changed, 5 insertions, 9 deletions
diff --git a/drivers/iio/gyro/Kconfig b/drivers/iio/gyro/Kconfig
index 41c64a43bcab..ac2d69e34c8c 100644
--- a/drivers/iio/gyro/Kconfig
+++ b/drivers/iio/gyro/Kconfig
@@ -70,7 +70,7 @@ config IIO_ST_GYRO_3AXIS
70 select IIO_TRIGGERED_BUFFER if (IIO_BUFFER) 70 select IIO_TRIGGERED_BUFFER if (IIO_BUFFER)
71 help 71 help
72 Say yes here to build support for STMicroelectronics gyroscopes: 72 Say yes here to build support for STMicroelectronics gyroscopes:
73 L3G4200D, LSM330DL, L3GD20, L3GD20H, LSM330DLC, L3G4IS, LSM330. 73 L3G4200D, LSM330DL, L3GD20, LSM330DLC, L3G4IS, LSM330.
74 74
75 This driver can also be built as a module. If so, these modules 75 This driver can also be built as a module. If so, these modules
76 will be created: 76 will be created:
diff --git a/drivers/iio/gyro/st_gyro.h b/drivers/iio/gyro/st_gyro.h
index f8f2bf84a5a2..c197360c450b 100644
--- a/drivers/iio/gyro/st_gyro.h
+++ b/drivers/iio/gyro/st_gyro.h
@@ -19,7 +19,6 @@
19#define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro" 19#define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro"
20#define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro" 20#define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro"
21#define L3GD20_GYRO_DEV_NAME "l3gd20" 21#define L3GD20_GYRO_DEV_NAME "l3gd20"
22#define L3GD20H_GYRO_DEV_NAME "l3gd20h"
23#define L3G4IS_GYRO_DEV_NAME "l3g4is_ui" 22#define L3G4IS_GYRO_DEV_NAME "l3g4is_ui"
24#define LSM330_GYRO_DEV_NAME "lsm330_gyro" 23#define LSM330_GYRO_DEV_NAME "lsm330_gyro"
25 24
diff --git a/drivers/iio/gyro/st_gyro_core.c b/drivers/iio/gyro/st_gyro_core.c
index d53d91adfb55..a8e174a47bc4 100644
--- a/drivers/iio/gyro/st_gyro_core.c
+++ b/drivers/iio/gyro/st_gyro_core.c
@@ -167,11 +167,10 @@ static const struct st_sensors st_gyro_sensors[] = {
167 .wai = ST_GYRO_2_WAI_EXP, 167 .wai = ST_GYRO_2_WAI_EXP,
168 .sensors_supported = { 168 .sensors_supported = {
169 [0] = L3GD20_GYRO_DEV_NAME, 169 [0] = L3GD20_GYRO_DEV_NAME,
170 [1] = L3GD20H_GYRO_DEV_NAME, 170 [1] = LSM330D_GYRO_DEV_NAME,
171 [2] = LSM330D_GYRO_DEV_NAME, 171 [2] = LSM330DLC_GYRO_DEV_NAME,
172 [3] = LSM330DLC_GYRO_DEV_NAME, 172 [3] = L3G4IS_GYRO_DEV_NAME,
173 [4] = L3G4IS_GYRO_DEV_NAME, 173 [4] = LSM330_GYRO_DEV_NAME,
174 [5] = LSM330_GYRO_DEV_NAME,
175 }, 174 },
176 .ch = (struct iio_chan_spec *)st_gyro_16bit_channels, 175 .ch = (struct iio_chan_spec *)st_gyro_16bit_channels,
177 .odr = { 176 .odr = {
diff --git a/drivers/iio/gyro/st_gyro_i2c.c b/drivers/iio/gyro/st_gyro_i2c.c
index 16b8b8d70bf1..23c12f361b05 100644
--- a/drivers/iio/gyro/st_gyro_i2c.c
+++ b/drivers/iio/gyro/st_gyro_i2c.c
@@ -55,7 +55,6 @@ static const struct i2c_device_id st_gyro_id_table[] = {
55 { LSM330DL_GYRO_DEV_NAME }, 55 { LSM330DL_GYRO_DEV_NAME },
56 { LSM330DLC_GYRO_DEV_NAME }, 56 { LSM330DLC_GYRO_DEV_NAME },
57 { L3GD20_GYRO_DEV_NAME }, 57 { L3GD20_GYRO_DEV_NAME },
58 { L3GD20H_GYRO_DEV_NAME },
59 { L3G4IS_GYRO_DEV_NAME }, 58 { L3G4IS_GYRO_DEV_NAME },
60 { LSM330_GYRO_DEV_NAME }, 59 { LSM330_GYRO_DEV_NAME },
61 {}, 60 {},
diff --git a/drivers/iio/gyro/st_gyro_spi.c b/drivers/iio/gyro/st_gyro_spi.c
index 94763e25caf9..b4ad3be26687 100644
--- a/drivers/iio/gyro/st_gyro_spi.c
+++ b/drivers/iio/gyro/st_gyro_spi.c
@@ -54,7 +54,6 @@ static const struct spi_device_id st_gyro_id_table[] = {
54 { LSM330DL_GYRO_DEV_NAME }, 54 { LSM330DL_GYRO_DEV_NAME },
55 { LSM330DLC_GYRO_DEV_NAME }, 55 { LSM330DLC_GYRO_DEV_NAME },
56 { L3GD20_GYRO_DEV_NAME }, 56 { L3GD20_GYRO_DEV_NAME },
57 { L3GD20H_GYRO_DEV_NAME },
58 { L3G4IS_GYRO_DEV_NAME }, 57 { L3G4IS_GYRO_DEV_NAME },
59 { LSM330_GYRO_DEV_NAME }, 58 { LSM330_GYRO_DEV_NAME },
60 {}, 59 {},