* [PATCH] iio: st_accel: fix interrupt handling on LIS3LV02
@ 2015-09-02 19:02 Linus Walleij
2015-09-05 16:27 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2015-09-02 19:02 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio; +Cc: Linus Walleij, Denis CIOCCA
This accelerometer accidentally either emits a DRDY signal or an
IRQ signal. Accidentally I activated the IRQ signal as I thought
it was analogous to the interrupt generator on other ST
accelerometers. This was wrong. After this patch generic_buffer
gives a nice stream of accelerometer readings.
Fixes: 3acddf74f807778f "iio: st-sensors: add support for lis3lv02d accelerometer"
Cc: Denis CIOCCA <denis.ciocca@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/iio/accel/st_accel_core.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index 058c87d9f564..6765eebb7c0a 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -149,8 +149,6 @@
#define ST_ACCEL_4_BDU_MASK 0x40
#define ST_ACCEL_4_DRDY_IRQ_ADDR 0x21
#define ST_ACCEL_4_DRDY_IRQ_INT1_MASK 0x04
-#define ST_ACCEL_4_IG1_EN_ADDR 0x21
-#define ST_ACCEL_4_IG1_EN_MASK 0x08
#define ST_ACCEL_4_MULTIREAD_BIT true
/* CUSTOM VALUES FOR SENSOR 5 */
@@ -484,10 +482,6 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
.drdy_irq = {
.addr = ST_ACCEL_4_DRDY_IRQ_ADDR,
.mask_int1 = ST_ACCEL_4_DRDY_IRQ_INT1_MASK,
- .ig1 = {
- .en_addr = ST_ACCEL_4_IG1_EN_ADDR,
- .en_mask = ST_ACCEL_4_IG1_EN_MASK,
- },
},
.multi_read_bit = ST_ACCEL_4_MULTIREAD_BIT,
.bootime = 2, /* guess */
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: st_accel: fix interrupt handling on LIS3LV02
2015-09-02 19:02 [PATCH] iio: st_accel: fix interrupt handling on LIS3LV02 Linus Walleij
@ 2015-09-05 16:27 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2015-09-05 16:27 UTC (permalink / raw)
To: Linus Walleij, linux-iio; +Cc: Denis CIOCCA
On 02/09/15 20:02, Linus Walleij wrote:
> This accelerometer accidentally either emits a DRDY signal or an
> IRQ signal. Accidentally I activated the IRQ signal as I thought
> it was analogous to the interrupt generator on other ST
> accelerometers. This was wrong. After this patch generic_buffer
> gives a nice stream of accelerometer readings.
>
> Fixes: 3acddf74f807778f "iio: st-sensors: add support for lis3lv02d accelerometer"
> Cc: Denis CIOCCA <denis.ciocca@st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Can see where that went wrong looking at the datasheets.
Applied to the fixes-togreg branch of iio.git and marked
for stable.
Thanks,
Jonathan
> ---
> drivers/iio/accel/st_accel_core.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
> index 058c87d9f564..6765eebb7c0a 100644
> --- a/drivers/iio/accel/st_accel_core.c
> +++ b/drivers/iio/accel/st_accel_core.c
> @@ -149,8 +149,6 @@
> #define ST_ACCEL_4_BDU_MASK 0x40
> #define ST_ACCEL_4_DRDY_IRQ_ADDR 0x21
> #define ST_ACCEL_4_DRDY_IRQ_INT1_MASK 0x04
> -#define ST_ACCEL_4_IG1_EN_ADDR 0x21
> -#define ST_ACCEL_4_IG1_EN_MASK 0x08
> #define ST_ACCEL_4_MULTIREAD_BIT true
>
> /* CUSTOM VALUES FOR SENSOR 5 */
> @@ -484,10 +482,6 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
> .drdy_irq = {
> .addr = ST_ACCEL_4_DRDY_IRQ_ADDR,
> .mask_int1 = ST_ACCEL_4_DRDY_IRQ_INT1_MASK,
> - .ig1 = {
> - .en_addr = ST_ACCEL_4_IG1_EN_ADDR,
> - .en_mask = ST_ACCEL_4_IG1_EN_MASK,
> - },
> },
> .multi_read_bit = ST_ACCEL_4_MULTIREAD_BIT,
> .bootime = 2, /* guess */
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-05 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02 19:02 [PATCH] iio: st_accel: fix interrupt handling on LIS3LV02 Linus Walleij
2015-09-05 16:27 ` Jonathan Cameron
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.