Threshold event and Sampling freq support for LTR390
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 3 repliesIn review
- v24 patches 6 repliesSuperseded
- v14 patches 0 repliesSuperseded
Changes in v3 from the cover letter
- Replace hardcoded mask values with GENMASK()
- Minor refactoring
- Code formatting changes
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | iio: light: ltr390: Added configurable sampling frequency supportdrivers/ | +66 | 0 replies | |
| 2/4 | iio: light: ltr390: Suspend and Resume supportdrivers/ | +22 | 1 reply | |
| 3/4 | iio: light: ltr390: Interrupts and threshold event supportdrivers/ | +212 | 1 reply | |
| 4/4 | iio: light: ltr390: Add interrupt persistance supportdrivers/ | +61 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/4] Threshold event and Sampling freq support for LTR390
Hello,
The first patch adds support for configuring the Sampling frequency of the sensor. The available values for the sampling freqeuncy are provided by the read_avail callback and they are in miliHertz.
Then the second patch adds support for suspending and resuming the sensor by providing the necessary callbacks. And registering the ops with the driver.
The third patch in the series adds support for Threshold events and interrupts. Exposed rising and falling threshold events for both the channels. The events can be configured via the write_event_config callback. The desired rising or falling threshold value can be written to from userspace.
The fourth patch adds support for threshold interrupt persistance.
It triggers when the UVS/ALS data is out of thresholds for a specific number of consecutive measurements.
Exposed the IIO_EV_INFO_PERIOD attribute by which userspace can set the persistance value in miliseconds. The persistance period should be greater than or equal to the sampling period.
Changes in v3:
- Replace hardcoded mask values with GENMASK()
- Minor refactoring
- Code formatting changes
Changes in v2:
- Added "linux/irq.h" include to fix -Wimplicit-function-declaration.
- The above error was pointed during testing by kernel-test-robot
Thanks,
Abhash
Abhash Jha (4):
iio: light: ltr390: Added configurable sampling frequency support
iio: light: ltr390: Suspend and Resume support
iio: light: ltr390: Interrupts and threshold event support
iio: light: ltr390: Add interrupt persistance support
drivers/iio/light/ltr390.c | 361 ++++++++++++++++++++++++++++++++++++- 1 file changed, 357 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.0