Skip to content

Commit

Permalink
iio: proximity: as3935: fix AS3935_INT mask
Browse files Browse the repository at this point in the history
AS3935 interrupt mask has been incorrect so valid lightning events
would never trigger an buffer event. Also noise interrupt should be
BIT(0).

Fixes: 24ddb0e ("iio: Add AS3935 lightning sensor support")
CC: [email protected]
Signed-off-by: Matt Ranostay <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
mranostay authored and jic23 committed Apr 27, 2017
1 parent 35fa70d commit 275292d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iio/proximity/as3935.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 275292d

Please sign in to comment.