Skip to content

Commit 24ddb0e

Browse files
mranostayjic23
authored andcommitted
iio: Add AS3935 lightning sensor support
AS3935 chipset can detect lightning strikes and reports those back as events and the estimated distance to the storm. Signed-off-by: Matt Ranostay <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 43c7ecb commit 24ddb0e

File tree

6 files changed

+499
-0
lines changed

6 files changed

+499
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
What /sys/bus/iio/devices/iio:deviceX/in_proximity_raw
2+
Date: March 2014
3+
KernelVersion: 3.15
4+
Contact: Matt Ranostay <[email protected]>
5+
Description:
6+
Get the current distance in meters of storm (1km steps)
7+
1000-40000 = distance in meters
8+
9+
What /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity
10+
Date: March 2014
11+
KernelVersion: 3.15
12+
Contact: Matt Ranostay <[email protected]>
13+
Description:
14+
Show or set the gain boost of the amp, from 0-31 range.
15+
18 = indoors (default)
16+
14 = outdoors

drivers/iio/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ if IIO_TRIGGER
7474
source "drivers/iio/trigger/Kconfig"
7575
endif #IIO_TRIGGER
7676
source "drivers/iio/pressure/Kconfig"
77+
source "drivers/iio/proximity/Kconfig"
7778
source "drivers/iio/temperature/Kconfig"
7879

7980
endif # IIO

drivers/iio/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ obj-y += light/
2424
obj-y += magnetometer/
2525
obj-y += orientation/
2626
obj-y += pressure/
27+
obj-y += proximity/
2728
obj-y += temperature/
2829
obj-y += trigger/

drivers/iio/proximity/Kconfig

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Proximity sensors
3+
#
4+
5+
menu "Lightning sensors"
6+
7+
config AS3935
8+
tristate "AS3935 Franklin lightning sensor"
9+
select IIO_BUFFER
10+
select IIO_TRIGGERED_BUFFER
11+
depends on SPI
12+
help
13+
Say Y here to build SPI interface support for the Austrian
14+
Microsystems AS3935 lightning detection sensor.
15+
16+
To compile this driver as a module, choose M here: the
17+
module will be called as3935
18+
19+
endmenu

drivers/iio/proximity/Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# Makefile for IIO proximity sensors
3+
#
4+
5+
# When adding new entries keep the list in alphabetical order
6+
obj-$(CONFIG_AS3935) += as3935.o

0 commit comments

Comments
 (0)