summaryrefslogtreecommitdiffstats
path: root/drivers/iio/proximity
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-04-27 00:52:32 -0700
committerJonathan Cameron <jic23@kernel.org>2017-04-27 16:28:57 +0100
commit275292d3a3d62670b1b13484707b74e5239b4bb0 (patch)
tree59e980d74753016dbd36d4d518e8fec62bfd7e45 /drivers/iio/proximity
parent35fa70dfd6e6f270d7aabb3470855208b11ac9fb (diff)
downloadlinux-stable-275292d3a3d62670b1b13484707b74e5239b4bb0.tar.gz
linux-stable-275292d3a3d62670b1b13484707b74e5239b4bb0.tar.bz2
linux-stable-275292d3a3d62670b1b13484707b74e5239b4bb0.zip
iio: proximity: as3935: fix AS3935_INT mask
AS3935 interrupt mask has been incorrect so valid lightning events would never trigger an buffer event. Also noise interrupt should be BIT(0). Fixes: 24ddb0e4bba4 ("iio: Add AS3935 lightning sensor support") CC: stable@vger.kernel.org Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/proximity')
-rw-r--r--drivers/iio/proximity/as3935.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c
index d0f5e53aad59..2e94e5ad884b 100644
--- a/drivers/iio/proximity/as3935.c
+++ b/drivers/iio/proximity/as3935.c
@@ -40,9 +40,9 @@
#define AS3935_AFE_PWR_BIT BIT(0)
#define AS3935_INT 0x03
-#define AS3935_INT_MASK 0x07
+#define AS3935_INT_MASK 0x0f
#define AS3935_EVENT_INT BIT(3)
-#define AS3935_NOISE_INT BIT(1)
+#define AS3935_NOISE_INT BIT(0)
#define AS3935_DATA 0x07
#define AS3935_DATA_MASK 0x3F