From: "Rafał Miłecki" <zajec5@gmail.com>
To: Richard Purdie <rpurdie@rpsys.net>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
linux-leds@vger.kernel.org
Cc: "Rob Herring" <robh+dt@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
devicetree@vger.kernel.org, "Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH 3/4] dt-bindings: leds: document binding for LED timer trigger
Date: Tue, 28 Feb 2017 13:04:51 +0100 [thread overview]
Message-ID: <20170228120452.10043-3-zajec5@gmail.com> (raw)
In-Reply-To: <20170228120452.10043-1-zajec5@gmail.com>
From: Rafał Miłecki <rafal@milecki.pl>
Timer trigger is one of the simplest, hardware independent triggers. It
just blinks LED with a given intervals.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
.../devicetree/bindings/leds/triggers-timer.txt | 18 ++++++++++++++++++
Documentation/devicetree/bindings/leds/triggers.txt | 17 +++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/triggers-timer.txt
diff --git a/Documentation/devicetree/bindings/leds/triggers-timer.txt b/Documentation/devicetree/bindings/leds/triggers-timer.txt
new file mode 100644
index 000000000000..0e6c81d6f81b
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/triggers-timer.txt
@@ -0,0 +1,18 @@
+Timer LED trigger properties.
+
+Timer trigger enables and disables LED with a given time intervals. It's example
+usage may be a simple indication that system is alive & working (to some point
+at least).
+
+Properties:
+- trigger-type : Must be "timer".
+- delay-on : Amount of time (in milliseconds) LED stays enabled.
+- delay-off : Amount of time (in milliseconds) LED stays disabled.
+
+Examples:
+
+timer-trigger {
+ trigger-type = "timer";
+ delay-on = <300>;
+ delay-off = <1000>;
+};
diff --git a/Documentation/devicetree/bindings/leds/triggers.txt b/Documentation/devicetree/bindings/leds/triggers.txt
index a1fbf3a75d67..8d8daa027bee 100644
--- a/Documentation/devicetree/bindings/leds/triggers.txt
+++ b/Documentation/devicetree/bindings/leds/triggers.txt
@@ -11,3 +11,20 @@ Common properties:
documentation for more details.
More properties can be available depending on the chosen trigger type.
+
+Examples:
+
+timer_trigger: timer-trigger {
+ trigger-type = "timer";
+ ...
+};
+
+gpio-leds {
+ compatible = "gpio-leds";
+
+ system-status {
+ label = "Status";
+ gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ triggers = <&timer_trigger>;
+ };
+};
--
2.11.0
next prev parent reply other threads:[~2017-02-28 12:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 12:04 [PATCH 1/4] dt-bindings: leds: document property for LED triggers Rafał Miłecki
2017-02-28 12:04 ` [PATCH 2/4] leds: triggers: add early support for trigger-type DT property Rafał Miłecki
2017-02-28 12:04 ` Rafał Miłecki [this message]
[not found] ` <20170228120452.10043-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-28 12:04 ` [PATCH 4/4] leds: triggers: support timer trigger DT bindings Rafał Miłecki
2017-02-28 21:38 ` [PATCH 1/4] dt-bindings: leds: document property for LED triggers Jacek Anaszewski
2017-02-28 21:51 ` Rafał Miłecki
2017-02-28 22:12 ` Rob Herring
2017-03-01 21:04 ` Jacek Anaszewski
2017-03-01 22:55 ` Rob Herring
[not found] ` <386c5b7b-0bc0-d286-6cbb-745a5adbc1e9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-06 6:06 ` Rafał Miłecki
2017-03-12 11:44 ` Rob Herring
[not found] ` <290ed068-2518-50ef-4d02-394bef8b7ee9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-01 21:04 ` Jacek Anaszewski
2017-03-06 6:16 ` Rafał Miłecki
2017-03-06 19:59 ` Jacek Anaszewski
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=20170228120452.10043-3-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-leds@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rafal@milecki.pl \
--cc=robh+dt@kernel.org \
--cc=rpurdie@rpsys.net \
/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).