Devicetree
 help / color / mirror / Atom feed
From: Herman van Hazendonk <github.com@herrie.org>
To: jic23@kernel.org
Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	tomasborquez13@gmail.com, masneyb@onstation.org,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Herman van Hazendonk <github.com@herrie.org>
Subject: [PATCH v3 0/3] iio: light: isl29018: overflow/precision fix + cover-glass gain via DT
Date: Thu,  4 Jun 2026 12:06:14 +0200	[thread overview]
Message-ID: <20260604100617.3486541-1-github.com@herrie.org> (raw)

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
-- 
2.43.0


             reply	other threads:[~2026-06-04 10:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 10:06 Herman van Hazendonk [this message]
2026-06-04 10:06 ` [PATCH v3 1/3] iio: light: isl29018: fix overflow and precision in isl29018_read_lux() Herman van Hazendonk
2026-06-04 10:06 ` [PATCH v3 2/3] dt-bindings: iio: light: isl29018: add isil,cover-comp-gain Herman van Hazendonk
2026-06-04 10:06 ` [PATCH v3 3/3] iio: light: isl29018: support cover-glass gain compensation via DT Herman van Hazendonk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260604100617.3486541-1-github.com@herrie.org \
    --to=github.com@herrie.org \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masneyb@onstation.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=tomasborquez13@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox