Some RJ-45 connectors have LEDs wired in the following way: LED1 +--|>|--+ | | A---+--|<|--+---B LED2 With + on A and - on B, LED1 is ON and LED2 is OFF. Inverting the polarity turns LED1 OFF and LED2 ON. So these LEDs exclude each other. Add new `excludes` property to the LED binding. The property is a phandle-array to all the other LEDs that are excluded by this LED. Signed-off-by: Marek Behún <kabel@xxxxxxxxxx> --- Documentation/devicetree/bindings/leds/common.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index a19acc781e89..03759d2e125a 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -59,6 +59,14 @@ properties: deprecated - use 'function' and 'color' properties instead. function-enumerator has no effect when this property is present. + excludes: + description: + List of LEDs that are excluded by this LED: if this LED is ON, the others + must be OFF. This is mostly the case when there are two LEDs connected in + parallel, but inversely: inverting the polarity of the source turns one + LED ON while the other OFF. There are RJ-45 connectors with such wiring. + $ref: /schemas/types.yaml#/definitions/phandle-array + default-state: description: The initial state of the LED. If the LED is already on or off and the -- 2.32.0