[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <v67xcjoyl56o5bw6rri6k3vwst7y7bhq7inncak6nvxtgcdaic@t6gxqawqh5ah>
Date: Mon, 2 Dec 2024 09:41:20 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Paul Kocialkowski <paulk@...-base.io>
Cc: linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>
Subject: Re: [PATCH 1/2] dt-bindings: iio: Add TI OPT4048 color sensor
bindings
On Sat, Nov 30, 2024 at 06:42:11PM +0100, Paul Kocialkowski wrote:
> The Texas Instruments OPT4048 is a XYZ tristimulus color sensor.
>
> It requires a VDD power supply and can optionally support an interrupt.
A nit, subject: drop second/last, redundant "bindings". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
>
> Signed-off-by: Paul Kocialkowski <paulk@...-base.io>
> ---
> .../bindings/iio/light/ti,opt4048.yaml | 54 +++++++++++++++++++
> 1 file changed, 54 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/light/ti,opt4048.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/light/ti,opt4048.yaml b/Documentation/devicetree/bindings/iio/light/ti,opt4048.yaml
> new file mode 100644
> index 000000000000..e2b7472ab588
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/ti,opt4048.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/light/ti,opt4048.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments OPT4048 XYZ tristimulus color sensor
> +
> +maintainers:
> + - Paul Kocialkowski <paulk@...-base.io>
> +
> +description: |
Do not need '|' unless you need to preserve formatting.
> + The device supports both interrupt-driven and interrupt-less operation,
> + depending on whether an interrupt property is present in the device-tree.
> +
> +properties:
> + compatible:
> + const: ti,opt4048
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> + description: |
Do not need '|' unless you need to preserve formatting.
> + The interrupt is detected on a falling edge, with a low level asserted
> + for 1 us. It might be missed because of hardware interrupt debouncing
> + mechanisms due to this short time.
> +
> + vdd-supply: true
> +
> +additionalProperties: false
This goes after required: block.
> +
> +required:
> + - compatible
> + - reg
> + - vdd-supply
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + light-sensor@44 {
> + compatible = "ti,opt4048";
Messed indentation, keep 4 spaces here.
With all above changes:
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Best regards,
Krzysztof
Powered by blists - more mailing lists