Re: [PATCH 1/2] dt-bindings: Document TI OPT4001 light sensor bindings

From: Rob Herring
Date: Tue Apr 04 2023 - 11:40:17 EST


On Tue, Apr 04, 2023 at 11:07:42AM +0200, Stefan Windfeldt-Prytz wrote:
> Add devicetree bindings for opt4001 ambient light sensor.
>
> Signed-off-by: Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@xxxxxxxx>
> ---
> .../devicetree/bindings/iio/light/ti,opt4001.yaml | 42 ++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/light/ti,opt4001.yaml b/Documentation/devicetree/bindings/iio/light/ti,opt4001.yaml
> new file mode 100644
> index 000000000000..cfd6b8b92c17
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/ti,opt4001.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/light/ti,opt4001.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments OPT4001 Ambient Light Sensor
> +
> +maintainers:
> + - Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@xxxxxxxx>
> +
> +description: |
> + Ambient light sensor with an i2c interface.
> + https://www.ti.com/lit/gpn/opt4001
> +
> +properties:
> + compatible:
> + enum:
> + - ti,opt4001-picostar
> + - ti,opt4001-sot-5x3

Please explain in the commit message or description of the device what
picostar and sot-5x3 mean.

> +
> + reg:
> + maxItems: 1
> +
> +additionalProperties: false
> +
> +required:
> + - compatible
> + - reg
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + light-sensor@44 {
> + compatible = "ti,opt4001-picostar";
> + reg = <0x44>;
> + };
> + };
> +...
>
> --
> 2.30.2
>