Message ID | 20220421140133.354498-3-shreeya.patel@collabora.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Add LTRF216A Driver | expand |
On 21/04/2022 16:01, Shreeya Patel wrote: Thank you for your patch. There is something to discuss/improve. > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/irq.h> > + > + i2c { > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + light-sensor@53 { > + compatible = "liteon,ltrf216a"; You have here unusual indentation - looks like 8 spaces, while the rest of example is properly indented with 4 spaces. Please use 4 spaces for entire DTS example. All rest looks good, so with indentation fixes: Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > + reg = <0x53>; > + vdd-supply = <&vdd_regulator>; > + interrupt-parent = <&gpio0>; > + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; > + }; > + }; Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml b/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml new file mode 100644 index 000000000000..61008bcc6b88 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/liteon,ltrf216a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LTRF216A Ambient Light Sensor + +maintainers: + - Shreeya Patel <shreeya.patel@collabora.com> + +description: | + Ambient light sensing with an i2c interface. + +properties: + compatible: + oneOf: + - const: liteon,ltrf216a + - const: ltr,ltrf216a + deprecated: true + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vdd-supply: + description: Regulator that provides power to the sensor. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@53 { + compatible = "liteon,ltrf216a"; + reg = <0x53>; + vdd-supply = <&vdd_regulator>; + interrupt-parent = <&gpio0>; + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; + }; + };
Add devicetree bindings for ltrf216a ambient light sensor. Signed-off-by: Shreeya Patel <shreeya.patel@collabora.com> --- Changes in v2 - Take over the maintainership for the bindings - Add interrupt and power supply property in DT bindings .../bindings/iio/light/liteon,ltrf216a.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml