diff mbox series

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

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

Commit Message

David Heidelberg Feb. 4, 2020, 9:30 a.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 | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/light/al3010.yaml

Comments

Michał Mirosław Feb. 4, 2020, 9:52 a.m. UTC | #1
On Tue, Feb 04, 2020 at 10:30:30AM +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.
[...]
> +properties:
> +  compatible:
> +    const: dynaimage,al3010
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  vdd-supply:
> +    description: Regulator that provides power to the sensor
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - vdd-supply

Regulator and interrupt should be optional.

Best Regards,
Michał Mirosław
Dmitry Osipenko Feb. 4, 2020, 3:10 p.m. UTC | #2
04.02.2020 12:52, Michał Mirosław пишет:
> On Tue, Feb 04, 2020 at 10:30:30AM +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.
> [...]
>> +properties:
>> +  compatible:
>> +    const: dynaimage,al3010
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  vdd-supply:
>> +    description: Regulator that provides power to the sensor
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - interrupts
>> +  - vdd-supply
> 
> Regulator and interrupt should be optional.

Indeed, that's a good correction +1
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..e7e0281476bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/al3010.yaml
@@ -0,0 +1,45 @@ 
+# 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
+  - interrupts
+  - vdd-supply
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        al3010@1c {
+            compatible = "dynaimage,al3010";
+            reg = <0x1c>;
+            vdd-supply = <&vdd_reg>;
+            interrupts = <0 99 4>;
+        };
+    };