All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: leds: register-bit-led: Add value property
@ 2022-07-06 11:28 Pali Rohár
  2022-07-06 11:28 ` [PATCH 2/2] leds: syscon: Implement support for " Pali Rohár
  2022-07-06 16:21 ` [PATCH 1/2] dt-bindings: leds: register-bit-led: Add " Rob Herring
  0 siblings, 2 replies; 7+ messages in thread
From: Pali Rohár @ 2022-07-06 11:28 UTC (permalink / raw)
  To: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Linus Walleij,
	Marek Behún
  Cc: linux-leds, devicetree, linux-kernel

Allow to define inverted logic (0 - enable LED, 1 - disable LED) via value
property. This property name is already used by other syscon drivers, e.g.
syscon-reboot.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 .../devicetree/bindings/leds/register-bit-led.yaml    | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/register-bit-led.yaml b/Documentation/devicetree/bindings/leds/register-bit-led.yaml
index 79b8fc0f9d23..d6054a3f9087 100644
--- a/Documentation/devicetree/bindings/leds/register-bit-led.yaml
+++ b/Documentation/devicetree/bindings/leds/register-bit-led.yaml
@@ -43,6 +43,17 @@ properties:
         0x100000, 0x200000, 0x400000, 0x800000, 0x1000000, 0x2000000, 0x4000000,
         0x8000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000 ]
 
+  value:
+    description:
+      bit value of ON state for the bit controlling this LED in the register
+      when not specified it is same as the mask
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum:
+      [ 0x0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800,
+        0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, 0x40000, 0x80000,
+        0x100000, 0x200000, 0x400000, 0x800000, 0x1000000, 0x2000000, 0x4000000,
+        0x8000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000 ]
+
   offset:
     description:
       register offset to the register controlling this LED
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-11 12:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06 11:28 [PATCH 1/2] dt-bindings: leds: register-bit-led: Add value property Pali Rohár
2022-07-06 11:28 ` [PATCH 2/2] leds: syscon: Implement support for " Pali Rohár
2022-07-06 16:21 ` [PATCH 1/2] dt-bindings: leds: register-bit-led: Add " Rob Herring
2022-07-06 16:23   ` Pali Rohár
2022-07-11 12:06     ` Linus Walleij
2022-07-11 12:10       ` Pali Rohár
2022-07-11 12:21         ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.