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

dt-bindings: leds: irled: ir-spi-led: convert to DT schema

Convert the SPI IR LED bindings to DT schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221204104323.117974-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Rob Herring
b2791545 0212be85

+61 -29
+61
Documentation/devicetree/bindings/leds/irled/ir-spi-led.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/leds/irled/ir-spi-led.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: IR LED connected through SPI bus 8 + 9 + maintainers: 10 + - Sean Young <sean@mess.org> 11 + 12 + description: 13 + IR LED switch is connected to the MOSI line of the SPI device and the data 14 + is delivered through that. 15 + 16 + allOf: 17 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 18 + 19 + properties: 20 + compatible: 21 + const: ir-spi-led 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + duty-cycle: 27 + $ref: /schemas/types.yaml#/definitions/uint8 28 + enum: [50, 60, 70, 75, 80, 90] 29 + description: 30 + Percentage of one period in which the signal is active. 31 + 32 + led-active-low: 33 + type: boolean 34 + description: 35 + Output is negated with a NOT gate. 36 + 37 + power-supply: true 38 + 39 + required: 40 + - compatible 41 + - reg 42 + 43 + unevaluatedProperties: false 44 + 45 + examples: 46 + - | 47 + spi { 48 + #address-cells = <1>; 49 + #size-cells = <0>; 50 + 51 + irled@0 { 52 + compatible = "ir-spi-led"; 53 + reg = <0x0>; 54 + 55 + duty-cycle = /bits/ 8 <60>; 56 + led-active-low; 57 + power-supply = <&irda_regulator>; 58 + spi-max-frequency = <5000000>; 59 + }; 60 + }; 61 +
-29
Documentation/devicetree/bindings/leds/irled/spi-ir-led.txt
··· 1 - Device tree bindings for IR LED connected through SPI bus which is used as 2 - remote controller. 3 - 4 - The IR LED switch is connected to the MOSI line of the SPI device and the data 5 - are delivered thourgh that. 6 - 7 - Required properties: 8 - - compatible: should be "ir-spi-led". 9 - 10 - Optional properties: 11 - - duty-cycle: 8 bit value that represents the percentage of one period 12 - in which the signal is active. It can be 50, 60, 70, 75, 80 or 90. 13 - - led-active-low: boolean value that specifies whether the output is 14 - negated with a NOT gate. 15 - - power-supply: specifies the power source. It can either be a regulator 16 - or a gpio which enables a regulator, i.e. a regulator-fixed as 17 - described in 18 - Documentation/devicetree/bindings/regulator/fixed-regulator.yaml 19 - 20 - Example: 21 - 22 - irled@0 { 23 - compatible = "ir-spi-led"; 24 - reg = <0x0>; 25 - spi-max-frequency = <5000000>; 26 - power-supply = <&vdd_led>; 27 - led-active-low; 28 - duty-cycle = /bits/ 8 <60>; 29 - };