diff mbox series

[v2,2/7] dt-bindings: iio: light: add support for Dyna-Image AL3010

Message ID 20200128133052.201587-3-david@ixit.cz (mailing list archive)
State Superseded
Headers show
Series iio: light: AL3010 introduction | expand

Commit Message

David Heidelberg Jan. 28, 2020, 1:30 p.m. UTC
The Dyna-Image AL3010 is a 16-bit digital ambient light sensor which
provides a multiple gain function with linear response over a dynamic
range 1216/4863/19452/77806.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
 .../devicetree/bindings/iio/light/al3010.yaml | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/light/al3010.yaml

Comments

Dmitry Osipenko Jan. 28, 2020, 7:43 p.m. UTC | #1
28.01.2020 16:30, David Heidelberg пишет:
> The Dyna-Image AL3010 is a 16-bit digital ambient light sensor which
> provides a multiple gain function with linear response over a dynamic
> range 1216/4863/19452/77806.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Rob Herring (Arm) Jan. 31, 2020, 2:24 p.m. UTC | #2
On Tue, 28 Jan 2020 14:30:47 +0100, David Heidelberg wrote:
> The Dyna-Image AL3010 is a 16-bit digital ambient light sensor which
> provides a multiple gain function with linear response over a dynamic
> range 1216/4863/19452/77806.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>  .../devicetree/bindings/iio/light/al3010.yaml | 40 +++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/light/al3010.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
Documentation/devicetree/bindings/iio/light/al3010.example.dts:20.17-30: Warning (reg_format): /example-0/i2c/al3010@1c:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Documentation/devicetree/bindings/iio/light/al3010.example.dt.yaml: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/light/al3010.example.dts:17.5-24.11: Warning (i2c_bus_bridge): /example-0/i2c: incorrect #address-cells for I2C bus
Documentation/devicetree/bindings/iio/light/al3010.example.dts:17.5-24.11: Warning (i2c_bus_bridge): /example-0/i2c: incorrect #size-cells for I2C bus
Documentation/devicetree/bindings/iio/light/al3010.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/light/al3010.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
Documentation/devicetree/bindings/iio/light/al3010.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/light/al3010.example.dts:18.23-23.15: Warning (avoid_default_addr_size): /example-0/i2c/al3010@1c: Relying on default #address-cells value
Documentation/devicetree/bindings/iio/light/al3010.example.dts:18.23-23.15: Warning (avoid_default_addr_size): /example-0/i2c/al3010@1c: Relying on default #size-cells value
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/light/al3010.example.dt.yaml: al3010@1c: 'interrupt' is a required property

See https://patchwork.ozlabs.org/patch/1230351
Please check and re-submit.
Dmitry Osipenko Jan. 31, 2020, 2:28 p.m. UTC | #3
31.01.2020 17:24, Rob Herring пишет:
> On Tue, 28 Jan 2020 14:30:47 +0100, David Heidelberg wrote:
>> The Dyna-Image AL3010 is a 16-bit digital ambient light sensor which
>> provides a multiple gain function with linear response over a dynamic
>> range 1216/4863/19452/77806.
>>
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
>>  .../devicetree/bindings/iio/light/al3010.yaml | 40 +++++++++++++++++++
>>  1 file changed, 40 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/iio/light/al3010.yaml
>>
> 
> My bot found errors running 'make dt_binding_check' on your patch:
> 
> Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
> Documentation/devicetree/bindings/iio/light/al3010.example.dts:20.17-30: Warning (reg_format): /example-0/i2c/al3010@1c:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
> Documentation/devicetree/bindings/iio/light/al3010.example.dt.yaml: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
> Documentation/devicetree/bindings/iio/light/al3010.example.dts:17.5-24.11: Warning (i2c_bus_bridge): /example-0/i2c: incorrect #address-cells for I2C bus
> Documentation/devicetree/bindings/iio/light/al3010.example.dts:17.5-24.11: Warning (i2c_bus_bridge): /example-0/i2c: incorrect #size-cells for I2C bus
> Documentation/devicetree/bindings/iio/light/al3010.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
> Documentation/devicetree/bindings/iio/light/al3010.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
> Documentation/devicetree/bindings/iio/light/al3010.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
> Documentation/devicetree/bindings/iio/light/al3010.example.dts:18.23-23.15: Warning (avoid_default_addr_size): /example-0/i2c/al3010@1c: Relying on default #address-cells value
> Documentation/devicetree/bindings/iio/light/al3010.example.dts:18.23-23.15: Warning (avoid_default_addr_size): /example-0/i2c/al3010@1c: Relying on default #size-cells value
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/light/al3010.example.dt.yaml: al3010@1c: 'interrupt' is a required property
> 
> See https://patchwork.ozlabs.org/patch/1230351
> Please check and re-submit.
> 

The bot is right.

> 
> +required:
> +  - compatible
> +  - reg
> +  - interrupt

               ^ (s) is missing

> +  - vdd-supply
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/light/al3010.yaml b/Documentation/devicetree/bindings/iio/light/al3010.yaml
new file mode 100644
index 000000000000..9cd1f34a6d63
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/al3010.yaml
@@ -0,0 +1,40 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/al3010.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dyna-Image AL3010 sensor
+
+maintainers:
+  - David Heidelberg <david@ixit.cz>
+
+properties:
+  compatible:
+    const: dynaimage,al3010
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  vdd-supply:
+    description: Regulator that provides power to the sensor
+
+required:
+  - compatible
+  - reg
+  - interrupt
+  - vdd-supply
+
+examples:
+  - |
+    i2c {
+        al3010@1c {
+            compatible = "dynaimage,al3010";
+            reg = <0x1c>;
+            vdd-supply = <&vdd_reg>;
+            interrupts = <0 99 4>;
+        };
+    };