Skip to content

Commit e3d455d

Browse files
whamejic23
authored andcommitted
iio: Add driver for Nicera D3-323-AA PIR sensor
Nicera D3-323-AA is a PIR sensor for human detection. It has support for raw data measurements and detection notification. The communication protocol is custom made and therefore needs to be GPIO bit banged. The device has two main settings that can be configured: a threshold value for detection and a band-pass filter. The configurable parameters for the band-pass filter are the high-pass and low-pass cutoff frequencies and its peak gain. Map these settings to the corresponding parameters in the `iio` framework. Raw data measurements can be obtained from the device. However, since we rely on bit banging, it will be rather cumbersome with buffer support. The main reason being that the data protocol has strict timing requirements (it's serial like UART), and it's mainly used during debugging since in real-world applications only the event notification is of importance. Therefore, only add support for events (for now). Signed-off-by: Waqar Hameed <waqar.hameed@axis.com> Link: https://patch.msgid.link/29f84da1431f4a3f17fdeef27297a4ab14455404.1751636734.git.waqar.hameed@axis.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent f432a7f commit e3d455d

File tree

3 files changed

+826
-0
lines changed

3 files changed

+826
-0
lines changed

drivers/iio/proximity/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ config CROS_EC_MKBP_PROXIMITY
3232
To compile this driver as a module, choose M here: the
3333
module will be called cros_ec_mkbp_proximity.
3434

35+
config D3323AA
36+
tristate "Nicera (Nippon Ceramic Co.) D3-323-AA PIR sensor"
37+
depends on GPIOLIB
38+
help
39+
Say Y here to build a driver for the Nicera D3-323-AA PIR sensor.
40+
41+
To compile this driver as a module, choose M here: the module will be
42+
called d3323aa.
43+
3544
config HX9023S
3645
tristate "TYHX HX9023S SAR sensor"
3746
select IIO_BUFFER

drivers/iio/proximity/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# When adding new entries keep the list in alphabetical order
77
obj-$(CONFIG_AS3935) += as3935.o
88
obj-$(CONFIG_CROS_EC_MKBP_PROXIMITY) += cros_ec_mkbp_proximity.o
9+
obj-$(CONFIG_D3323AA) += d3323aa.o
910
obj-$(CONFIG_HX9023S) += hx9023s.o
1011
obj-$(CONFIG_IRSD200) += irsd200.o
1112
obj-$(CONFIG_ISL29501) += isl29501.o

0 commit comments

Comments
 (0)