Devicetree
 help / color / mirror / Atom feed
From: me@herrie.org
To: Jonathan Cameron <jic23@kernel.org>
Cc: Conor Dooley <conor@kernel.org>,
	Herman van Hazendonk <github.com@herrie.org>,
	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
Subject: Re: [PATCH v3 2/3] dt-bindings: iio: light: isl29018: add isil,cover-comp-gain
Date: Fri, 05 Jun 2026 15:18:41 +0200	[thread overview]
Message-ID: <b6919a62f06ad8e4e80232d9b2a0e706@herrie.org> (raw)
In-Reply-To: <20260605140449.1d7538ee@jic23-huawei>

On 2026-06-05 15:04, Jonathan Cameron wrote:
> On Thu, 4 Jun 2026 18:01:08 +0100
> Conor Dooley <conor@kernel.org> wrote:
> 
>> On Thu, Jun 04, 2026 at 12:06:16PM +0200, Herman van Hazendonk wrote:
>> > Document the new optional property that seeds the ISL29018 calibration
>> > scale factor at boot from firmware, allowing boards with tinted cover
>> > glass to ship with correct luminance readings without a userspace helper.
>> >
>> > The value is a positive integer (minimum 1, maximum 65535) that is
>> > multiplied with the raw lux reading.  Userspace can still override it
>> > at runtime through in_illuminance0_calibscale.
>> >
>> > Signed-off-by: Herman van Hazendonk <github.com@herrie.org>
>> > ---
>> >  .../devicetree/bindings/iio/light/isl29018.yaml     | 13 +++++++++++++
>> >  1 file changed, 13 insertions(+)
>> >
>> > diff --git a/Documentation/devicetree/bindings/iio/light/isl29018.yaml b/Documentation/devicetree/bindings/iio/light/isl29018.yaml
>> > index 0ea278b07d1c..92ea2742bbd3 100644
>> > --- a/Documentation/devicetree/bindings/iio/light/isl29018.yaml
>> > +++ b/Documentation/devicetree/bindings/iio/light/isl29018.yaml
>> > @@ -34,6 +34,19 @@ properties:
>> >    vcc-supply:
>> >      description: Regulator that provides power to the sensor
>> >
>> > +  isil,cover-comp-gain:
>> > +    description: |
>> > +      Multiplier applied to the ambient-light reading at startup to
>> > +      compensate for optical loss in the board's cover glass. Boards
>> > +      that mount the sensor under a tinted or coated window typically
>> > +      need a value between a few and a few hundred.
> 
> Is it useful to support decimal points on these values?  The userspace 
> interface
> does and you mention the 'right' answer might be only a few which means 
> precision
> at that range will be terrible - less of an issue if 100s!
> 
> Thanks
> 
> Jonathan
> 
Hard to say, my old HP TouchPad needs 100 as a value here (taken from 
legacy 2.6.35
kernel and binaries). So we probably don't need precision, but I have no 
other
references to substantiate.

Thanks
Herman
> 
> 
>> 
>> > The value seeds
>> > +      in_illuminance0_calibscale, so it can still be retuned at
>> > +      runtime through sysfs.
>> 
>> Delete this, driver implementation stuff isn't relevant to the
>> devicetree binding.
>> 
>> With that gone,
>> Acked-by: Conor Dooley <conor.dooley@microchip.com>
>> 
>> pw-bot: changes-requested
>> 
>> Cheers,
>> Conor.
>> 
>> > +    $ref: /schemas/types.yaml#/definitions/uint32
>> > +    minimum: 1
>> > +    maximum: 65535
>> > +    default: 1
>> > +
>> >  required:
>> >    - compatible
>> >    - reg
>> > --
>> > 2.43.0
>> >

  reply	other threads:[~2026-06-05 13:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 10:06 [PATCH v3 0/3] iio: light: isl29018: overflow/precision fix + cover-glass gain via DT Herman van Hazendonk
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 20:23   ` Andy Shevchenko
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 17:01   ` Conor Dooley
2026-06-05 13:04     ` Jonathan Cameron
2026-06-05 13:18       ` me [this message]
2026-06-05 19:28         ` me
2026-06-08 17:49           ` Conor Dooley
2026-06-14 19:51             ` Jonathan Cameron
2026-06-15 11:20               ` me
2026-06-04 10:06 ` [PATCH v3 3/3] iio: light: isl29018: support cover-glass gain compensation via DT Herman van Hazendonk
2026-06-04 20:50   ` Andy Shevchenko

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=b6919a62f06ad8e4e80232d9b2a0e706@herrie.org \
    --to=me@herrie.org \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=github.com@herrie.org \
    --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