linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: leds: Add DT binding for Richtek RT8515
@ 2020-08-12  9:07 Linus Walleij
  2020-08-12  9:07 ` [PATCH 2/2] leds: rt8515: Add Richtek RT8515 LED driver Linus Walleij
  2020-08-13 21:06 ` [PATCH 1/2] dt-bindings: leds: Add DT binding for Richtek RT8515 Jacek Anaszewski
  0 siblings, 2 replies; 9+ messages in thread
From: Linus Walleij @ 2020-08-12  9:07 UTC (permalink / raw)
  To: Jacek Anaszewski, Pavel Machek, Dan Murphy
  Cc: linux-leds, Linus Walleij, newbytee, Stephan Gerhold, devicetree

Add a YAML devicetree binding for the Richtek RT8515
dual channel flash/torch LED driver.

Cc: newbytee@protonmail.com
Cc: Stephan Gerhold <stephan@gerhold.net>
Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 .../bindings/leds/richtek,rt8515.yaml         | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/richtek,rt8515.yaml

diff --git a/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml b/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml
new file mode 100644
index 000000000000..579ef8a2e40a
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/richtek,rt8515.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Richtek RT8515 1.5A dual channel LED driver
+
+maintainers:
+  - Linus Walleij <linus.walleij@linaro.org>
+
+description: |
+  The Richtek RT8515 is a dual channel (two mode) LED driver that
+  supports driving a white LED in flash or torch mode.
+
+properties:
+  compatible:
+    const: richtek,rt8515
+
+  enf-gpios:
+    maxItems: 1
+    description: A connection to the 'ENF' (enable flash) pin.
+
+  ent-gpios:
+    maxItems: 1
+    description: A connection to the 'ENT' (enable torch) pin.
+
+  led:
+    type: object
+    $ref: common.yaml#
+
+required:
+  - compatible
+  - ent-gpios
+  - enf-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/leds/common.h>
+
+    led-controller {
+        compatible = "richtek,rt8515";
+        enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
+        ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
+
+        led {
+            function = LED_FUNCTION_FLASH;
+            color = <LED_COLOR_ID_WHITE>;
+            flash-max-timeout-us = <250000>;
+        };
+    };
-- 
2.26.2


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

end of thread, other threads:[~2020-10-15 20:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12  9:07 [PATCH 1/2] dt-bindings: leds: Add DT binding for Richtek RT8515 Linus Walleij
2020-08-12  9:07 ` [PATCH 2/2] leds: rt8515: Add Richtek RT8515 LED driver Linus Walleij
2020-08-13 21:04   ` Jacek Anaszewski
2020-10-14 10:52     ` Linus Walleij
2020-10-15 20:39       ` Jacek Anaszewski
2020-08-13 21:06 ` [PATCH 1/2] dt-bindings: leds: Add DT binding for Richtek RT8515 Jacek Anaszewski
2020-08-19 21:05   ` Linus Walleij
2020-08-19 21:20     ` Jacek Anaszewski
2020-09-09  8:37       ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).