From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964818AbcBYTjN (ORCPT ); Thu, 25 Feb 2016 14:39:13 -0500 Received: from down.free-electrons.com ([37.187.137.238]:54404 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933377AbcBYTjK (ORCPT ); Thu, 25 Feb 2016 14:39:10 -0500 Date: Thu, 25 Feb 2016 11:38:09 -0800 From: Maxime Ripard To: Krzysztof Adamski Cc: Linus Walleij , Chen-Yu Tsai , Hans de Goede , Lee Jones , Rob Herring , Jens Kuske , Fabian Frederick , Vishnu Patekar , 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 Message-ID: <20160225193809.GO4736@lukather> References: <1456146208-13890-1-git-send-email-k@japko.eu> <1456146208-13890-5-git-send-email-k@japko.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hXth9cGL35Nvpk4x" Content-Disposition: inline In-Reply-To: <1456146208-13890-5-git-send-email-k@japko.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --hXth9cGL35Nvpk4x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Krzysztof Adamski > --- > arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 63 ++++++++++++++++++++++= ++++++ > 1 file changed, 63 insertions(+) >=20 > 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" > =20 > #include > +#include > #include > =20 > / { > @@ -58,6 +59,68 @@ > chosen { > stdout-path =3D "serial0:115200n8"; > }; > + > + leds { > + compatible =3D "gpio-leds"; > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&leds_opc>; > + > + status_led { > + label =3D "status:red:user"; > + gpios =3D <&pio 0 15 GPIO_ACTIVE_HIGH>; > + }; > + }; > + > + r_leds { > + compatible =3D "gpio-leds"; > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&leds_r_opc>; > + > + tx { > + label =3D "pwr:green:user"; > + gpios =3D <&r_pio 0 10 GPIO_ACTIVE_HIGH>; > + default-state =3D "on"; > + }; > + }; You can merge the two gpio-leds nodes into a single one. Plus, the label format is :: In these case, it would be more "orangepi-plus:red:status" and "orangepi-plus:green:pwr". Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --hXth9cGL35Nvpk4x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWz1ghAAoJEBx+YmzsjxAgBN4QALmOw3G8Nj/bppRXQexJsTKM uvr/K0nKp5e7OnqlatiJAaJTKLCJvBeITPHJ2bHDz5ivFtI4B8hf+GJWArQcPjbF 6aFyKk1ehte2BuAWK8aBF6noUNG4nfGNp/MMPAYX2wjX2vtYzobGGIpysZZWTSQe H0XE4l07LLpVKg33IbRyieV9qpCLWIX1CajpvCgNIYiLN68h5ysFS1Qby98EAv3F a0i+7d9C8DsXaP507fJEADemO6WllRGOsqUVpw71pzlvCUI6V6zqfEd4INLmLd7C 6/5s/Z0JUqMTUJpIvA6rnLLc5S6f02De33EpHv9m2u2dUvubg80ws8K1MI3X+Fu0 7OYvFWXfFFR/XiDRm/MaGdItoqlWEqjW9KADVk/zvUMg7VBAloURrElIR4CSVVe0 /8FGPsyhM1/3l1yJZzOu+S0wKal2fR7uzO+FBCrbi8gy1XwUIMlE4CPvD9eKP6zj E5XuSLmBFFebx0eDGc8kMz7/4fPE2sZvML88Q94G1IdnA01gMINUibpas8K8XSET cB/hq3LKMqGd/savhjSWLDKUtRkOiyE18xXPDQJ1ni86bNFUx7+vfBi+bScmzbcm qjwnWgVPFASQ3y4EpsDieid+nbV2qhv67TOoWhQO54HhgDdd2GUgqc5mmJ2nXT35 2zusBrUsi1zf1Km12RIT =wwMw -----END PGP SIGNATURE----- --hXth9cGL35Nvpk4x--