From: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Marc Zyngier <marc.zyngier-5wv7dgnIgG8@public.gmane.org>,
Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Bryan Wu <cooloney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Richard Purdie <rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org>
Subject: [PATCH 2/6] leds: add device tree bindings for syscon LEDs
Date: Fri, 25 Jul 2014 15:23:44 +0200 [thread overview]
Message-ID: <1406294628-16079-3-git-send-email-linus.walleij@linaro.org> (raw)
In-Reply-To: <1406294628-16079-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
This adds the device tree bindings used by syscon-based LEDs.
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Bryan Wu <cooloney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Richard Purdie <rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org>
Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
.../devicetree/bindings/leds/leds-syscon.txt | 83 ++++++++++++++++++++++
1 file changed, 83 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/leds-syscon.txt
diff --git a/Documentation/devicetree/bindings/leds/leds-syscon.txt b/Documentation/devicetree/bindings/leds/leds-syscon.txt
new file mode 100644
index 000000000000..460b9c3d1bd3
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-syscon.txt
@@ -0,0 +1,83 @@
+Device Tree Bindings for Syscon LEDs
+
+Required properties:
+- compatible : must be "syscon-leds".
+- regmap : a phandle to a syscon node containing a regmap
+
+Each LED is represented as a sub-node of the syscon-leds device. Each
+node's name represents the name of the corresponding LED.
+
+LED sub-node properties:
+- offset : register offset to the register controlling this LED
+- mask : bit mask for the bit controlling this LED in the register
+ typically 0x01, 0x02, 0x04 ...
+- label : (optional)
+ see Documentation/devicetree/bindings/leds/common.txt
+- linux,default-trigger : (optional)
+ see Documentation/devicetree/bindings/leds/common.txt
+- default-state: (optional) The initial state of the LED. Valid
+ values are "on", "off", and "keep". If the LED is already on or off
+ and the default-state property is set the to same value, then no
+ glitch should be produced where the LED momentarily turns off (or
+ on). The "keep" setting will keep the LED at whatever its current
+ state is, without producing a glitch. The default is off if this
+ property is not present.
+
+Example:
+
+leds: leds@08 {
+ compatible = "syscon-leds";
+ regmap = <&syscon>;
+
+ led@bit0 {
+ offset = <0x08>;
+ mask = <0x01>;
+ label = "versatile:0";
+ linux,default-trigger = "heartbeat";
+ default-state = "on";
+ };
+ led@bit1 {
+ offset = <0x08>;
+ mask = <0x02>;
+ label = "versatile:1";
+ linux,default-trigger = "mmc0";
+ default-state = "off";
+ };
+ led@bit2 {
+ offset = <0x08>;
+ mask = <0x04>;
+ label = "versatile:2";
+ linux,default-trigger = "cpu0";
+ default-state = "off";
+ };
+ led@bit3 {
+ offset = <0x08>;
+ mask = <0x08>;
+ label = "versatile:3";
+ default-state = "off";
+ };
+ led@bit4 {
+ offset = <0x08>;
+ mask = <0x10>;
+ label = "versatile:4";
+ default-state = "off";
+ };
+ led@bit5 {
+ offset = <0x08>;
+ mask = <0x20>;
+ label = "versatile:5";
+ default-state = "off";
+ };
+ led@bit6 {
+ offset = <0x08>;
+ mask = <0x40>;
+ label = "versatile:6";
+ default-state = "off";
+ };
+ led@bit7 {
+ offset = <0x08>;
+ mask = <0x80>;
+ label = "versatile:7";
+ default-state = "off";
+ };
+};
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-07-25 13:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 13:23 [PATCH 0/6] ARM RealView DeviceTree support v4 Linus Walleij
[not found] ` <1406294628-16079-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-25 13:23 ` [PATCH 1/6] leds: add a driver for syscon-based LEDs Linus Walleij
[not found] ` <1406294628-16079-2-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-13 9:14 ` Linus Walleij
2014-07-25 13:23 ` Linus Walleij [this message]
[not found] ` <1406294628-16079-3-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-25 14:07 ` [PATCH 2/6] leds: add device tree bindings for syscon LEDs Rob Herring
[not found] ` <CAL_Jsq+-G68wjBLDbELHRDFcGYRa65-Hx9WoD6HypXNjJKVDvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-13 9:31 ` Linus Walleij
2014-07-25 13:23 ` [PATCH 3/6] power: reset: driver for the Versatile syscon reboot Linus Walleij
2014-07-25 13:23 ` [PATCH 4/6] power: reset: DT bindings for the Versatile reset driver Linus Walleij
2014-07-25 13:23 ` [PATCH 5/6] soc: add driver for the ARM RealView Linus Walleij
2014-07-25 13:23 ` [PATCH 6/6 v4] ARM: realview: basic device tree implementation Linus Walleij
[not found] ` <1406294628-16079-7-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-25 15:24 ` Mark Rutland
2014-07-25 15:50 ` Russell King - ARM Linux
[not found] ` <20140725155010.GP21766-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-07-25 15:58 ` Arnd Bergmann
2014-09-01 12:03 ` Russell King - ARM Linux
[not found] ` <20140901120313.GI30401-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-09-01 12:11 ` Arnd Bergmann
2014-09-01 11:52 ` Linus Walleij
[not found] ` <CACRpkdaugAmVt5CF194xd+eVyz=Yfir6Jz0k9h4VSvSWLkKPRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-01 12:17 ` Mark Rutland
2014-09-01 12:27 ` Linus Walleij
[not found] ` <CACRpkdYoqhiLqVMqrrUxZEq-c63NuDT--FVWs3j_5b1BC24FeA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-01 12:44 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1406294628-16079-3-git-send-email-linus.walleij@linaro.org \
--to=linus.walleij-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=cooloney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=marc.zyngier-5wv7dgnIgG8@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org \
--cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).