Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings:iio:light:ti,opt3001: txt to yaml conversion

Straight forward format conversion of this simple binding.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Link: https://lore.kernel.org/r/20201031184854.745828-19-jic23@kernel.org

+47 -25
-25
Documentation/devicetree/bindings/iio/light/opt3001.txt
··· 1 - * Texas Instruments OPT3001 Ambient Light Sensor 2 - 3 - The driver supports interrupt-driven and interrupt-less operation, depending 4 - on whether an interrupt property has been populated into the DT. Note that 5 - the optional generation of IIO events on rising/falling light threshold changes 6 - requires the use of interrupts. Without interrupts, only the simple reading 7 - of the current light value is supported through the IIO API. 8 - 9 - https://www.ti.com/product/opt3001 10 - 11 - Required properties: 12 - - compatible: should be "ti,opt3001" 13 - - reg: the I2C address of the sensor 14 - 15 - Optional properties: 16 - - interrupts: interrupt mapping for GPIO IRQ (configure for falling edge) 17 - 18 - Example: 19 - 20 - opt3001@44 { 21 - compatible = "ti,opt3001"; 22 - reg = <0x44>; 23 - interrupt-parent = <&gpio1>; 24 - interrupts = <28 IRQ_TYPE_EDGE_FALLING>; 25 - };
+47
Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/iio/light/ti,opt3001.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments OPT3001 Ambient Light Sensor 8 + 9 + maintainers: 10 + - Andreas Dannenberg <dannenberg@ti.com> 11 + 12 + description: | 13 + The device supports interrupt-driven and interrupt-less operation, depending 14 + on whether an interrupt property has been populated into the DT. 15 + 16 + properties: 17 + compatible: 18 + const: ti,opt3001 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + interrupts: 24 + maxItems: 1 25 + description: Should be configured with type IRQ_TYPE_EDGE_FALLING 26 + 27 + additionalProperties: false 28 + 29 + required: 30 + - compatible 31 + - reg 32 + 33 + examples: 34 + - | 35 + #include <dt-bindings/interrupt-controller/irq.h> 36 + i2c { 37 + #address-cells = <1>; 38 + #size-cells = <0>; 39 + 40 + light-sensor@44 { 41 + compatible = "ti,opt3001"; 42 + reg = <0x44>; 43 + interrupt-parent = <&gpio1>; 44 + interrupts = <28 IRQ_TYPE_EDGE_FALLING>; 45 + }; 46 + }; 47 + ...