Add driver for Nicera D3-323-AA PIR sensor
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 5 repliesIn review
- v23 patches 9 repliesSuperseded
- v13 patches 1 replySuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | dt-bindings: vendor-prefixes: Add NiceraDocumentation/ | +2 | 0 replies | |
| 2/3 | dt-bindings: iio: proximity: Add Nicera D3-323-AA PIR sensorDocumentation/ | +62 | 2 replies | |
| 3/3 | iio: Add driver for Nicera D3-323-AA PIR sensordrivers/ drivers/ drivers/ | +824 | 3 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Krzysztof Kozlowski |
|---|---|
| 1/3 | A-b |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/3] 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.
Previously, there has been an attempt to add a driver for this device [1]. However, that driver was written for the wrong sub-system. hwmon is clearly not a suitable framework for a proximity device.
In this series, we add a driver for support for event notification for detections through IIO (the more appropriate sub-system!). The various settings have been mapped to existing sysfs ABIs in the IIO framework.
The public datasheet [2] is quite sparse. A more detailed version can be obtained through the company.
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://www.endrich.com/Datenbl%C3%A4tter/Sensoren/D3-323-AA_e.pdf
Changes in v3:
[dt-bindings]
* Re-add gpio include header and use a constant from that header.
[iio]
* Convert irq_reset_count from atomic_t into an u8.
* Add a comment in d3323aa_reset() explaining regulator_is_enabled()-check is for probe().
* Use flseep() in places where the delay is flexible.
* Rephrase comment about enabling VDD and counting falling edges.
* Declare and use a variable for struct device* in probe().
* Remove impossible error print for devm_add_action_or_reset().
* Add a comment for devm_add_action_or_reset() call in d3323aa_probe() explaining when the regulator is enabled.
* Add a comment clarifying the regulator_is_enabled() check in d3323aa_disable_regulator().
* Change -ERANGE return values to -EINVAL for the set-functions in d3323aa_write_raw().
Link to v2: https://lore.kernel.org/lkml/[email protected]/
Changes in v2:
[dt-bindings]
* Convert vdd-gpio to a vdd-supply.
* Rename clk-vout-gpio to vout-clk-gpios.
* Add description for data-gpios explaining the rename to a more descriptive name.
* Drop all references to driver.
* Remove unused gpio include in examples.
* Re-phrase commit message to only describe the hardware.
[iio]
* Add newline after variable definitions inside the for-loop in d3323aa_set_lp_filter_freq().
* Remove error code in string in dev_err_probe().
* Remove driver name macro and use it inline instead.
* Format filter gain arrays into one line.
* Drop structure comment in probe().
* Format sentinel value in of_device_id with a space.
* Rename gpiod_clk_vout to gpiod_clkin_detectout.
* Request vout-clk GPIO to match rename in dt-bindings.
* Use the regulator framework for supply voltage.
* Use only one IRQ handler for both reset and detection.
* Reword comment about Vout/CLK ramp-up behavior (it's because of VDD charging up).
* Add comment for why we have both IRQF_TRIGGER_RISING and IRQF_TRIGGER_FALLING.
* Rename regmap to regbitmap to not confuse with the regmap-framework.
* Move d3323aa_setup() into the set-functions.
* Use state variables in d3323aa_data instead of bitmap and move bitmap handling to read/write settings functions.
* Pad bitmap with compulsory end pattern in d3323aa_write_settings().
* Add d3323aa_set_hp_filter_freq() and allow userspace to set it.
Link to v1: https://lore.kernel.org/lkml/[email protected]/
Waqar Hameed (3):
dt-bindings: vendor-prefixes: Add Nicera
dt-bindings: iio: proximity: Add Nicera D3-323-AA PIR sensor
iio: Add driver for Nicera D3-323-AA PIR sensor
.../iio/proximity/nicera,d3323aa.yaml | 62 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + drivers/iio/proximity/Kconfig | 9 + drivers/iio/proximity/Makefile | 1 + drivers/iio/proximity/d3323aa.c | 814 ++++++++++++++++++ 5 files changed, 888 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/proximity/nicera,d3323aa.yaml create mode 100644 drivers/iio/proximity/d3323aa.c
base-commit: 66701750d5565c574af42bef0b789ce0203e3071
Signature · 1 line
2.39.5