iio: light: isl29018: overflow/precision fix + cover-glass gain via DT
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 9 repliesIn review
- v22 patches 1 replySuperseded
- v11 patch 2 repliesSuperseded
Changes in v3 from the cover letter
- Split the DT binding into its own commit per maintainer feedback on v2 (binding must precede the driver patch that consumes the new property). The series is now 3 patches in dependency order:
precision fix -> binding -> driver.
- PATCH 1/3: tighten the precision fix. v2 widened the intermediate arithmetic to u64 but still discarded the sub-lux remainder before applying calibscale, which collapsed to zero on low ranges with large cover-glass gain. v3 keeps the remainder via div_u64_rem() so even small counts contribute. Switching from '/' and '%' on u64 to div_u64()/div_u64_rem() also restores the ARM32 build, which v2 broke with __aeabi_uldivmod.
- PATCH 3/3 (driver) addresses Andy's review of v2:
* hoist 'struct device *dev = &client->dev;' so subsequent device_property_*() and devm_*() calls are uniform;
* guard the property read with device_property_present() and surface the failure with dev_err_probe(), rather than silently falling back when device_property_read_u32() returns -EINVAL on a malformed value;
* the silent fallback (calibscale = 1) only applies when the property is genuinely absent, which matches the tsl2563.c precedent.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | iio: light: isl29018: fix overflow and precision in isl29018_read_lux()drivers/ | +11 | 1 reply | |
| 2/3 | dt-bindings: iio: light: isl29018: add isil,cover-comp-gainDocumentation/ | +13 | 7 replies | |
| 3/3 | iio: light: isl29018: support cover-glass gain compensation via DTdrivers/ | +13 | 1 reply |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Conor Dooley |
|---|---|
| 1/3 | |
| 2/3 | A-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] iio: light: isl29018: overflow/precision fix + cover-glass gain via DT
v3:
- Split the DT binding into its own commit per maintainer feedback on v2 (binding must precede the driver patch that consumes the new property). The series is now 3 patches in dependency order:
precision fix -> binding -> driver.
- PATCH 1/3: tighten the precision fix. v2 widened the intermediate arithmetic to u64 but still discarded the sub-lux remainder before applying calibscale, which collapsed to zero on low ranges with large cover-glass gain. v3 keeps the remainder via div_u64_rem() so even small counts contribute. Switching from '/' and '%' on u64 to div_u64()/div_u64_rem() also restores the ARM32 build, which v2 broke with __aeabi_uldivmod.
- PATCH 3/3 (driver) addresses Andy's review of v2:
* hoist 'struct device *dev = &client->dev;' so subsequent device_property_*() and devm_*() calls are uniform;
* guard the property read with device_property_present() and surface the failure with dev_err_probe(), rather than silently falling back when device_property_read_u32() returns -EINVAL on a malformed value;
* the silent fallback (calibscale = 1) only applies when the property is genuinely absent, which matches the tsl2563.c precedent.
PATCH 2/3 is the new standalone binding commit; the schema, default, and rationale are unchanged from v2.
A follow-up DTS patch enabling this for the HP TouchPad will be sent separately to the ARM/DTS tree once the driver change is upstream.
Herman van Hazendonk (3):
iio: light: isl29018: fix overflow and precision in
isl29018_read_lux()
dt-bindings: iio: light: isl29018: add isil,cover-comp-gain
iio: light: isl29018: support cover-glass gain compensation via DT
.../bindings/iio/light/isl29018.yaml | 13 ++++++++ drivers/iio/light/isl29018.c | 31 ++++++++++++++----- 2 files changed, 37 insertions(+), 7 deletions(-)
base-commit: 944125b4c454b58d2fe6e35f1087a932b2050dff
Signature · 1 line
2.43.0