Re: [PATCH v3 2/3] dt-bindings: iio: light: isl29018: add isil,cover-comp-gain
From: me
Date: Fri Jun 05 2026 - 09:22:18 EST
On 2026-06-05 15:04, Jonathan Cameron wrote:
On Thu, 4 Jun 2026 18:01:08 +0100Hard to say, my old HP TouchPad needs 100 as a value here (taken from legacy 2.6.35
Conor Dooley <conor@xxxxxxxxxx> 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@xxxxxxxxxx>
> ---
> .../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
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@xxxxxxxxxxxxx>
pw-bot: changes-requested
Cheers,
Conor.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 1
> + maximum: 65535
> + default: 1
> +
> required:
> - compatible
> - reg
> --
> 2.43.0
>