From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Krzysztof Adamski <k@japko.eu>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Chen-Yu Tsai <wens@csie.org>, Hans de Goede <hdegoede@redhat.com>,
Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Jens Kuske <jenskuske@gmail.com>,
Fabian Frederick <fabf@skynet.be>,
Vishnu Patekar <vishnupatekar0510@gmail.com>,
linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com
Subject: Re: [PATCH v5 4/4] ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards
Date: Thu, 25 Feb 2016 11:38:09 -0800 [thread overview]
Message-ID: <20160225193809.GO4736@lukather> (raw)
In-Reply-To: <1456146208-13890-5-git-send-email-k@japko.eu>
[-- Attachment #1: Type: text/plain, Size: 1772 bytes --]
Hi,
On Mon, Feb 22, 2016 at 02:03:28PM +0100, Krzysztof Adamski wrote:
> OrangePi Plus board has two leds - green ("pwr") and red ("status")
> and a switch ("sw4"). This patch describes them in a devicetree.
>
> Signed-off-by: Krzysztof Adamski <k@japko.eu>
> ---
> arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 63 ++++++++++++++++++++++++++++
> 1 file changed, 63 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
> index e67df59..5f159d0 100644
> --- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
> @@ -45,6 +45,7 @@
> #include "sunxi-common-regulators.dtsi"
>
> #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> #include <dt-bindings/pinctrl/sun4i-a10.h>
>
> / {
> @@ -58,6 +59,68 @@
> chosen {
> stdout-path = "serial0:115200n8";
> };
> +
> + leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <&leds_opc>;
> +
> + status_led {
> + label = "status:red:user";
> + gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
> + };
> + };
> +
> + r_leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <&leds_r_opc>;
> +
> + tx {
> + label = "pwr:green:user";
> + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
> + default-state = "on";
> + };
> + };
You can merge the two gpio-leds nodes into a single one.
Plus, the label format is <board>:<colour>:<role>
In these case, it would be more "orangepi-plus:red:status" and
"orangepi-plus:green:pwr".
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-02-25 19:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 13:03 [PATCH v5 0/4] pinctrl: sunxi: Add H3 R_PIO controller support Krzysztof Adamski
2016-02-22 13:03 ` [PATCH v5 1/4] clk: sunxi: Add apb0 gates for H3 Krzysztof Adamski
2016-02-25 19:29 ` Maxime Ripard
2016-02-22 13:03 ` [PATCH v5 2/4] dts: sun8i-h3: Add APB0 related clocks and resets Krzysztof Adamski
2016-02-25 19:33 ` Maxime Ripard
2016-02-22 13:03 ` [PATCH v5 3/4] ARM: dts: sun8i-h3: Add R_PIO controller node to the dtsi Krzysztof Adamski
2016-02-25 9:31 ` Linus Walleij
2016-02-25 19:34 ` Maxime Ripard
2016-02-22 13:03 ` [PATCH v5 4/4] ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards Krzysztof Adamski
2016-02-25 19:38 ` Maxime Ripard [this message]
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=20160225193809.GO4736@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=fabf@skynet.be \
--cc=hdegoede@redhat.com \
--cc=jenskuske@gmail.com \
--cc=k@japko.eu \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=robh@kernel.org \
--cc=vishnupatekar0510@gmail.com \
--cc=wens@csie.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