[PATCH] Add triggers for cubietruck leds

72 views
Skip to first unread message

Henry Paulissen

unread,
Feb 24, 2016, 3:57:36 AM2/24/16
to linux...@googlegroups.com, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King, Maxime Ripard, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
This (small) patch gives the same led trigger functionality
as the 3.4 sunxi kernel and although mainline doesn't has
to be the same, it helps in identifying and builds upon the
user expectations about what those leds mean.

Signed-off-by: Henry Paulissen <he...@nitronetworks.nl>
---
arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index 8da939a..bea6b0f 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -70,21 +70,29 @@
blue {
label = "cubietruck:blue:usr";
gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ default-state = "off";
};

orange {
label = "cubietruck:orange:usr";
gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "cpu0";
+ default-state = "off";
};

white {
label = "cubietruck:white:usr";
gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "cpu1";
+ default-state = "off";
};

green {
label = "cubietruck:green:usr";
gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "mmc1";
+ default-state = "off";
};
};

--
2.5.0

Henry Paulissen

unread,
Feb 24, 2016, 4:01:09 AM2/24/16
to linux-sunxi, rob...@kernel.org, pawel...@arm.com, mark.r...@arm.com, ijc+dev...@hellion.org.uk, ga...@codeaurora.org, li...@arm.linux.org.uk, maxime...@free-electrons.com, we...@csie.org, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org

Op woensdag 24 februari 2016 09:57:36 UTC+1 schreef Henry Paulissen:
This (small) patch gives the same led trigger functionality
as the 3.4 sunxi kernel and although mainline doesn't has
to be the same, it helps in identifying and builds upon the
user expectations about what those leds mean.

Signed-off-by: Henry Paulissen <he...@nitronetworks.nl>


 I don't know how we could have ever lived without.....

Maxime Ripard

unread,
Feb 25, 2016, 1:41:43 PM2/25/16
to Henry Paulissen, linux...@googlegroups.com, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Hi,

On Wed, Feb 24, 2016 at 09:57:25AM +0100, Henry Paulissen wrote:
> This (small) patch gives the same led trigger functionality
> as the 3.4 sunxi kernel and although mainline doesn't has
> to be the same, it helps in identifying and builds upon the
> user expectations about what those leds mean.
>
> Signed-off-by: Henry Paulissen <he...@nitronetworks.nl>

We don't take these trigger patches because it should be left for the
user to decide, and everyone has a different opinion on that.

It's something that you can also very easily enforce from the
userspace through sysfs.

Thanks!
Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
signature.asc
Reply all
Reply to author
Forward
0 new messages