All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ying.Liu@freescale.com (Liu Ying)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED
Date: Mon, 10 Feb 2014 14:05:23 +0800	[thread overview]
Message-ID: <52F86C23.1010101@freescale.com> (raw)
In-Reply-To: <20140210030214.GB9628@S2101-09.ap.freescale.net>

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
>>
>>
> 

WARNING: multiple messages have this Message-ID (diff)
From: Liu Ying <Ying.Liu@freescale.com>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: devicetree@vger.kernel.org, kernel@pengutronix.de,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED
Date: Mon, 10 Feb 2014 14:05:23 +0800	[thread overview]
Message-ID: <52F86C23.1010101@freescale.com> (raw)
In-Reply-To: <20140210030214.GB9628@S2101-09.ap.freescale.net>

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
>>
>>
> 

  parent reply	other threads:[~2014-02-10  6:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 13:57 [PATCH] ARM: dts: i.MX51 babbage: Support diagnostic LED Liu Ying
2014-02-04 13:57 ` Liu Ying
2014-02-10  3:02 ` Shawn Guo
2014-02-10  3:02   ` Shawn Guo
2014-02-10  4:29   ` Alexander Shiyan
2014-02-10  4:29     ` Alexander Shiyan
2014-02-10  6:24     ` Liu Ying
2014-02-10  6:24       ` Liu Ying
2014-02-10  6:31       ` Shawn Guo
2014-02-10  6:31         ` Shawn Guo
2014-02-10  6:05   ` Liu Ying [this message]
2014-02-10  6:05     ` Liu Ying

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=52F86C23.1010101@freescale.com \
    --to=ying.liu@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.