2022-06-15 13:54:47

by Shreeya Patel

[permalink] [raw]
Subject: [PATCH v6 1/2] dt-bindings: Document ltrf216a light sensor bindings

Add devicetree bindings for ltrf216a ambient light sensor.

Signed-off-by: Shreeya Patel <[email protected]>
---
Changes in v5
- Remove deprecated string 'ltr' from the bindings.

Changes in v3
- Fix indentation in the example section

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 | 50 +++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml

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..f256ff2e744c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml
@@ -0,0 +1,50 @@
+# 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 <[email protected]>
+
+description:
+ Ambient light sensing with an i2c interface.
+
+properties:
+ compatible:
+ const:
+ - liteon,ltrf216a
+
+ 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>;
+ };
+ };
--
2.30.2


2022-06-15 17:31:21

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v6 1/2] dt-bindings: Document ltrf216a light sensor bindings

On Wed, 15 Jun 2022 19:21:29 +0530, Shreeya Patel wrote:
> Add devicetree bindings for ltrf216a ambient light sensor.
>
> Signed-off-by: Shreeya Patel <[email protected]>
> ---
> Changes in v5
> - Remove deprecated string 'ltr' from the bindings.
>
> Changes in v3
> - Fix indentation in the example section
>
> 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 | 50 +++++++++++++++++++
> 1 file changed, 50 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml: properties:compatible:const: ['liteon,ltrf216a'] is not of type 'string'
from schema $id: http://devicetree.org/meta-schemas/string-array.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml: ignoring, error in schema: properties: compatible: const
Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.example.dtb:0:0: /example-0/i2c/light-sensor@53: failed to match any schema with compatible: ['liteon,ltrf216a']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.

2022-06-19 12:37:01

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH v6 1/2] dt-bindings: Document ltrf216a light sensor bindings

On Wed, 15 Jun 2022 19:21:29 +0530
Shreeya Patel <[email protected]> wrote:

> Add devicetree bindings for ltrf216a ambient light sensor.
>
> Signed-off-by: Shreeya Patel <[email protected]>
> ---
> Changes in v5
> - Remove deprecated string 'ltr' from the bindings.
>
> Changes in v3
> - Fix indentation in the example section
>
> 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 | 50 +++++++++++++++++++
> 1 file changed, 50 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml
>
> 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..f256ff2e744c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml
> @@ -0,0 +1,50 @@
> +# 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 <[email protected]>
> +
> +description:
> + Ambient light sensing with an i2c interface.
> +
> +properties:
> + compatible:
> + const:
> + - liteon,ltrf216a
I assume you figured this out from the build bot error.

const: liteon,ltrf216a

Please make sure to do what that message from Rob's bot says and test your bindings
before sending v7.

> +
> + 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>;
> + };
> + };

2022-06-19 13:06:27

by Shreeya Patel

[permalink] [raw]
Subject: Re: [PATCH v6 1/2] dt-bindings: Document ltrf216a light sensor bindings


On 19/06/22 18:04, Jonathan Cameron wrote:
> On Wed, 15 Jun 2022 19:21:29 +0530
> Shreeya Patel <[email protected]> wrote:
>
>> Add devicetree bindings for ltrf216a ambient light sensor.
>>
>> Signed-off-by: Shreeya Patel <[email protected]>
>> ---
>> Changes in v5
>> - Remove deprecated string 'ltr' from the bindings.
>>
>> Changes in v3
>> - Fix indentation in the example section
>>
>> 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 | 50 +++++++++++++++++++
>> 1 file changed, 50 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml
>>
>> 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..f256ff2e744c
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml
>> @@ -0,0 +1,50 @@
>> +# 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 <[email protected]>
>> +
>> +description:
>> + Ambient light sensing with an i2c interface.
>> +
>> +properties:
>> + compatible:
>> + const:
>> + - liteon,ltrf216a
> I assume you figured this out from the build bot error.
>
> const: liteon,ltrf216a
>
> Please make sure to do what that message from Rob's bot says and test your bindings
> before sending v7.

Hi Jonathan,

Sorry for the noise, I wasn't seeing this error before when I tested it
on my machine.
I just did a make clean and was able to see the error after that. I have
fixed it now for v7.


Thanks,
Shreeya Patel

>
>> +
>> + 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>;
>> + };
>> + };