Add light channel for LTR390
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest posting 2/22 patches 5 repliesIn review
- v7 posting 1/22 patches 0 repliesSuperseded
- v62 patches 2 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 3 patches | 6 replies | Applied | |
| v4 | 3 patches | 0 replies | Superseded | |
| v3 | 3 patches | 4 replies | Superseded | |
| v2 | 3 patches | 3 replies | Superseded | |
| v1 | 1 patch | 3 replies | Superseded |
Changes in v7 from the cover letter
- Changed the ltr390_set_mode function to do better error handling.
- Link to v6: https://lore.kernel.org/linux-iio/[email protected]/T/#t
Patches in v7 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | iio: light: ltr390: Add ALS channel and support for gain and resolutiondrivers/ | +90 | 0 replies | |
| 2/2 | iio: light: ltr390: Calculate 'counts_per_uvi' dynamicallydrivers/ | +12 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v7 yet.
Cover letter [PATCH v7 0/2] Add light channel for LTR390
Hello,
The first patch adds a new channel for the ALS feature of the sensor. The same configuration of gain and resolution has to be provided for this channel as well. As there are two IIO channels now, we would need to switch the sensor's mode of operation depending on which sensor is being accessed. Hence, mode switching is also provided.
Then the second patch adds support for calculating counts_per_uvi based on the current gain and resolution value.
Changes in v7:
- Changed the ltr390_set_mode function to do better error handling.
- Link to v6: https://lore.kernel.org/linux-iio/[email protected]/T/#t
Changes in v6:
- Changed IIO_CHAN_INFO_PROCESSED to IIO_CHAN_INFO_RAW
- Changed the scaling code
- Link to v5: https://lore.kernel.org/linux-iio/CAG=0Rq+q0WJzMroYwQy-4Ng0aSkTvaw-FEMx68i3MqAZwfteCg@mail.gmail.com/T/#t
Changes in v5:
- Replaced the IIO_INTENSITY channel with IIO_LIGHT channel
- We calculate the lux value directly using als_data / (gain * int_time)
- Provided a scale channel where the scale is 0.6 * WINDOW_FACTOR
- Link to v4: https://lore.kernel.org/linux-iio/[email protected]/T/#m
Changes in v4:
- Added "bitfield.h" include to fix -Wimplicit-function-declaration.
- Link to v3: https://lore.kernel.org/linux-iio/[email protected]/
Changes in v3:
- Added cover letter to the patch series.
- Fixed indentation in the patch description.
- Patch specific changes are listed below.
[PATCH v3 1/3]
- Cleaned up the spurious changes made in v2.
- ltr390_set_int_time and ltr390_set_gain now return -EINVAL to indicate no match.
[PATCH v3 2/3]
- Used enum ltr390_mode inside the ltr390_data struct.
- Refactored ltr390_set_mode function according to the comments in v2.
[PATCH v3 3/3]
- Simplified the formula for counts_per_uvi calculation.
- Removed spurious whitespace changes introduced in v2.
- Link to v2: https://lore.kernel.org/linux-iio/[email protected]/
Changes in v2:
- Split the single patch into 3 patches.
- Used FIELD_PREP to perform bit shifting.
- Used enum for mode selection instead of defines.
- Fixed indentation and whitespace issues pointed out in the comments
- Replaced mutex_lock(&data->lock) with guard(mutex)(&data->lock)
- Provided available values for gain and resolution via read_avail instead of sysfs attributes.
- Refactored ltr390_set_gain and ltr390_set_int_time.
- Used early returns instead of single exit points.
- Link to v1: https://lore.kernel.org/linux-iio/[email protected]/
Regards,
Abhash
Abhash Jha (2):
iio: light: ltr390: Add ALS channel and support for gain and
resolution
iio: light: ltr390: Calculate 'counts_per_uvi' dynamically
drivers/iio/light/ltr390.c | 115 ++++++++++++++++++++++++++++++++----- 1 file changed, 100 insertions(+), 15 deletions(-)
Signature · 1 line
2.43.0