* [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED
@ 2014-02-04 13:57 Liu Ying
2014-02-10 3:02 ` Shawn Guo
0 siblings, 1 reply; 6+ messages in thread
From: Liu Ying @ 2014-02-04 13:57 UTC (permalink / raw)
To: shawn.guo-QSEj5FYQhm4dnm+yROfE0A
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA, kernel-bIcnvbaLZ9MEGnE8C9+IrQ
The D25 LED controlled by gpio on the i.MX51 babbage
board is a diagnostic LED according to the board design.
This patch adds the relevant device tree nodes to the
i.MX51 babbage device tree file to support this LED.
Signed-off-by: Liu Ying <Ying.Liu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
arch/arm/boot/dts/imx51-babbage.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
index be1407c..8d6a74b 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dts
@@ -81,6 +81,17 @@
};
};
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pin_gpio2_6>;
+
+ led-diagnostic {
+ label = "diagnostic";
+ gpios = <&gpio2 6 0>;
+ };
+ };
+
sound {
compatible = "fsl,imx51-babbage-sgtl5000",
"fsl,imx-audio-sgtl5000";
@@ -280,6 +291,12 @@
MX51_PAD_CSPI1_RDY__GPIO4_26 0x80000000
>;
};
+
+ led_pin_gpio2_6: led_gpio2_6 {
+ fsl,pins = <
+ MX51_PAD_EIM_D22__GPIO2_6 0x80000000
+ >;
+ };
};
};
--
1.7.9.5
--
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED
2014-02-04 13:57 [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED Liu Ying
@ 2014-02-10 3:02 ` Shawn Guo
2014-02-10 4:29 ` Alexander Shiyan
2014-02-10 6:05 ` Liu Ying
0 siblings, 2 replies; 6+ messages in thread
From: Shawn Guo @ 2014-02-10 3:02 UTC (permalink / raw)
To: Liu Ying; +Cc: devicetree, kernel, linux-arm-kernel
On Tue, Feb 04, 2014 at 09:57:42PM +0800, Liu Ying wrote:
> The D25 LED controlled by gpio on the i.MX51 babbage
> board is a diagnostic LED according to the board design.
> This patch adds the relevant device tree nodes to the
> i.MX51 babbage device tree file to support this LED.
>
> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
> ---
> arch/arm/boot/dts/imx51-babbage.dts | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
> index be1407c..8d6a74b 100644
> --- a/arch/arm/boot/dts/imx51-babbage.dts
> +++ b/arch/arm/boot/dts/imx51-babbage.dts
> @@ -81,6 +81,17 @@
> };
> };
>
> + leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <&led_pin_gpio2_6>;
> +
> + led-diagnostic {
> + label = "diagnostic";
> + gpios = <&gpio2 6 0>;
Just out of curiosity, how will you use/trigger the led?
> + };
> + };
> +
> sound {
> compatible = "fsl,imx51-babbage-sgtl5000",
> "fsl,imx-audio-sgtl5000";
> @@ -280,6 +291,12 @@
> MX51_PAD_CSPI1_RDY__GPIO4_26 0x80000000
> >;
> };
> +
> + led_pin_gpio2_6: led_gpio2_6 {
This might be copied from some existing file, but I would hope the name
can be more generic, something like the following
pinctrl_gpio_leds: gpioledsgrp {
, so that when we have more gpio controlled leds to add, we can just add
more pins into the same group without concerning the name.
Shawn
> + fsl,pins = <
> + MX51_PAD_EIM_D22__GPIO2_6 0x80000000
> + >;
> + };
> };
> };
>
> --
> 1.7.9.5
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED
2014-02-10 3:02 ` Shawn Guo
@ 2014-02-10 4:29 ` Alexander Shiyan
2014-02-10 6:24 ` Liu Ying
2014-02-10 6:05 ` Liu Ying
1 sibling, 1 reply; 6+ messages in thread
From: Alexander Shiyan @ 2014-02-10 4:29 UTC (permalink / raw)
To: Shawn Guo; +Cc: devicetree, Liu Ying, linux-arm-kernel, kernel
Понедельник, 10 февраля 2014, 11:02 +08:00 от Shawn Guo <shawn.guo@linaro.org>:
> On Tue, Feb 04, 2014 at 09:57:42PM +0800, Liu Ying wrote:
> > The D25 LED controlled by gpio on the i.MX51 babbage
> > board is a diagnostic LED according to the board design.
> > This patch adds the relevant device tree nodes to the
> > i.MX51 babbage device tree file to support this LED.
> >
> > Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
> > ---
> > arch/arm/boot/dts/imx51-babbage.dts | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/imx51-babbage.dts
> b/arch/arm/boot/dts/imx51-babbage.dts
> > index be1407c..8d6a74b 100644
> > --- a/arch/arm/boot/dts/imx51-babbage.dts
> > +++ b/arch/arm/boot/dts/imx51-babbage.dts
> > @@ -81,6 +81,17 @@
> > };
> > };
> >
> > + leds {
> > + compatible = "gpio-leds";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&led_pin_gpio2_6>;
> > +
> > + led-diagnostic {
> > + label = "diagnostic";
> > + gpios = <&gpio2 6 0>;
>
> Just out of curiosity, how will you use/trigger the led?
And GPIO bindings should be used to specify active level,
GPIO_ACTIVE_HIGH in this case.
---
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED
2014-02-10 3:02 ` Shawn Guo
2014-02-10 4:29 ` Alexander Shiyan
@ 2014-02-10 6:05 ` Liu Ying
1 sibling, 0 replies; 6+ messages in thread
From: Liu Ying @ 2014-02-10 6:05 UTC (permalink / raw)
To: Shawn Guo; +Cc: devicetree, kernel, linux-arm-kernel
On 02/10/2014 11:02 AM, Shawn Guo wrote:
> On Tue, Feb 04, 2014 at 09:57:42PM +0800, Liu Ying wrote:
>> The D25 LED controlled by gpio on the i.MX51 babbage
>> board is a diagnostic LED according to the board design.
>> This patch adds the relevant device tree nodes to the
>> i.MX51 babbage device tree file to support this LED.
>>
>> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
>> ---
>> arch/arm/boot/dts/imx51-babbage.dts | 17 +++++++++++++++++
>> 1 file changed, 17 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
>> index be1407c..8d6a74b 100644
>> --- a/arch/arm/boot/dts/imx51-babbage.dts
>> +++ b/arch/arm/boot/dts/imx51-babbage.dts
>> @@ -81,6 +81,17 @@
>> };
>> };
>>
>> + leds {
>> + compatible = "gpio-leds";
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&led_pin_gpio2_6>;
>> +
>> + led-diagnostic {
>> + label = "diagnostic";
>> + gpios = <&gpio2 6 0>;
>
> Just out of curiosity, how will you use/trigger the led?
>
Switch on the LED:
echo 1 > /sys/class/leds/diagnostic/brightness
Switch off the LED:
echo 0 > /sys/class/leds/diagnostic/brightness
>> + };
>> + };
>> +
>> sound {
>> compatible = "fsl,imx51-babbage-sgtl5000",
>> "fsl,imx-audio-sgtl5000";
>> @@ -280,6 +291,12 @@
>> MX51_PAD_CSPI1_RDY__GPIO4_26 0x80000000
>> >;
>> };
>> +
>> + led_pin_gpio2_6: led_gpio2_6 {
>
> This might be copied from some existing file, but I would hope the name
> can be more generic, something like the following
>
> pinctrl_gpio_leds: gpioledsgrp {
>
> , so that when we have more gpio controlled leds to add, we can just add
> more pins into the same group without concerning the name.
>
Agree. I will address this comment in patch v2. Thanks!
Regards,
Liu Ying
>
>> + fsl,pins = <
>> + MX51_PAD_EIM_D22__GPIO2_6 0x80000000
>> + >;
>> + };
>> };
>> };
>>
>> --
>> 1.7.9.5
>>
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED
2014-02-10 4:29 ` Alexander Shiyan
@ 2014-02-10 6:24 ` Liu Ying
[not found] ` <52F87087.4000908-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Liu Ying @ 2014-02-10 6:24 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: devicetree, Shawn Guo, linux-arm-kernel, kernel
On 02/10/2014 12:29 PM, Alexander Shiyan wrote:
> Понедельник, 10 февраля 2014, 11:02 +08:00 от Shawn Guo <shawn.guo@linaro.org>:
>> On Tue, Feb 04, 2014 at 09:57:42PM +0800, Liu Ying wrote:
>>> The D25 LED controlled by gpio on the i.MX51 babbage
>>> board is a diagnostic LED according to the board design.
>>> This patch adds the relevant device tree nodes to the
>>> i.MX51 babbage device tree file to support this LED.
>>>
>>> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
>>> ---
>>> arch/arm/boot/dts/imx51-babbage.dts | 17 +++++++++++++++++
>>> 1 file changed, 17 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/imx51-babbage.dts
>> b/arch/arm/boot/dts/imx51-babbage.dts
>>> index be1407c..8d6a74b 100644
>>> --- a/arch/arm/boot/dts/imx51-babbage.dts
>>> +++ b/arch/arm/boot/dts/imx51-babbage.dts
>>> @@ -81,6 +81,17 @@
>>> };
>>> };
>>>
>>> + leds {
>>> + compatible = "gpio-leds";
>>> + pinctrl-names = "default";
>>> + pinctrl-0 = <&led_pin_gpio2_6>;
>>> +
>>> + led-diagnostic {
>>> + label = "diagnostic";
>>> + gpios = <&gpio2 6 0>;
>>
>> Just out of curiosity, how will you use/trigger the led?
>
> And GPIO bindings should be used to specify active level,
> GPIO_ACTIVE_HIGH in this case.
Based on Linux 3.14-rc2, this gives me no single output:
grep GPIO_ACTIVE arch/arm/boot/dts/ -nr | grep imx
So, this patch follows the old approach.
I agree to use GPIO_ACTIVE_HIGH/GPIO_ACTIVE_LOW macros.
How about generating dedicated patch sets for this purpose?
Actually, I had one set for i.MX51 platforms.
Regards,
Liu Ying
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED
[not found] ` <52F87087.4000908-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
@ 2014-02-10 6:31 ` Shawn Guo
0 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2014-02-10 6:31 UTC (permalink / raw)
To: Liu Ying
Cc: Alexander Shiyan, devicetree-u79uwXL29TY76Z2rM5mHXA,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Mon, Feb 10, 2014 at 02:24:07PM +0800, Liu Ying wrote:
> >>> @@ -81,6 +81,17 @@
> >>> };
> >>> };
> >>>
> >>> + leds {
> >>> + compatible = "gpio-leds";
> >>> + pinctrl-names = "default";
> >>> + pinctrl-0 = <&led_pin_gpio2_6>;
> >>> +
> >>> + led-diagnostic {
> >>> + label = "diagnostic";
> >>> + gpios = <&gpio2 6 0>;
> >>
> >> Just out of curiosity, how will you use/trigger the led?
> >
> > And GPIO bindings should be used to specify active level,
> > GPIO_ACTIVE_HIGH in this case.
>
> Based on Linux 3.14-rc2, this gives me no single output:
> grep GPIO_ACTIVE arch/arm/boot/dts/ -nr | grep imx
If you grep linux-next, you will find quite a few.
>
> So, this patch follows the old approach.
>
> I agree to use GPIO_ACTIVE_HIGH/GPIO_ACTIVE_LOW macros.
> How about generating dedicated patch sets for this purpose?
> Actually, I had one set for i.MX51 platforms.
I prefer to have this change in the same patch.
Shawn
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-10 6:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 13:57 [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED Liu Ying
2014-02-10 3:02 ` Shawn Guo
2014-02-10 4:29 ` Alexander Shiyan
2014-02-10 6:24 ` Liu Ying
[not found] ` <52F87087.4000908-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-02-10 6:31 ` Shawn Guo
2014-02-10 6:05 ` Liu Ying
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).