diff mbox

[1/3] ARM: dts: sun4i: The blue led on the Mele A1000 is a power led

Message ID 1465129393-22379-1-git-send-email-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hans de Goede June 5, 2016, 12:23 p.m. UTC
The blue led on the Mele A1000 is wired to light up as soon as the board
has powered (it will be on while the gpio is still in input / floating
mode), also its location on the top-set box clearly signals "power led".

Until now we've been treating this as a generic usr function led, which
means that when you plug power into the top-set box, the power-led lights
and then turns off as soon as the kernel loads, which looks wrong.

This renames the led from a1000:blue:usr to a1000:blue:pwr and marks
it as default on, fixing this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun4i-a10-a1000.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Chen-Yu Tsai June 6, 2016, 7:01 a.m. UTC | #1
On Sun, Jun 5, 2016 at 8:23 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> The blue led on the Mele A1000 is wired to light up as soon as the board
> has powered (it will be on while the gpio is still in input / floating
> mode), also its location on the top-set box clearly signals "power led".
>
> Until now we've been treating this as a generic usr function led, which
> means that when you plug power into the top-set box, the power-led lights
> and then turns off as soon as the kernel loads, which looks wrong.
>
> This renames the led from a1000:blue:usr to a1000:blue:pwr and marks
> it as default on, fixing this.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>
Chen-Yu Tsai June 6, 2016, 7:05 a.m. UTC | #2
On Mon, Jun 6, 2016 at 3:01 PM, Chen-Yu Tsai <wens@csie.org> wrote:
> On Sun, Jun 5, 2016 at 8:23 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>> The blue led on the Mele A1000 is wired to light up as soon as the board
>> has powered (it will be on while the gpio is still in input / floating
>> mode), also its location on the top-set box clearly signals "power led".
>>
>> Until now we've been treating this as a generic usr function led, which
>> means that when you plug power into the top-set box, the power-led lights
>> and then turns off as soon as the kernel loads, which looks wrong.
>>
>> This renames the led from a1000:blue:usr to a1000:blue:pwr and marks
>> it as default on, fixing this.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Acked-by: Chen-Yu Tsai <wens@csie.org>

BTW, the kernel now supports using an LED as a panic indicator.
Would it be useful to use the power LED for this?

ChenYu
Hans de Goede June 6, 2016, 7:24 a.m. UTC | #3
Hi,

On 06-06-16 09:05, Chen-Yu Tsai wrote:
> On Mon, Jun 6, 2016 at 3:01 PM, Chen-Yu Tsai <wens@csie.org> wrote:
>> On Sun, Jun 5, 2016 at 8:23 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>>> The blue led on the Mele A1000 is wired to light up as soon as the board
>>> has powered (it will be on while the gpio is still in input / floating
>>> mode), also its location on the top-set box clearly signals "power led".
>>>
>>> Until now we've been treating this as a generic usr function led, which
>>> means that when you plug power into the top-set box, the power-led lights
>>> and then turns off as soon as the kernel loads, which looks wrong.
>>>
>>> This renames the led from a1000:blue:usr to a1000:blue:pwr and marks
>>> it as default on, fixing this.
>>>
>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>
>> Acked-by: Chen-Yu Tsai <wens@csie.org>
>
> BTW, the kernel now supports using an LED as a panic indicator.
> Would it be useful to use the power LED for this?

Maybe I'm not 100% sure either way.

Regards,

Hans
Maxime Ripard June 7, 2016, 9:24 p.m. UTC | #4
On Sun, Jun 05, 2016 at 02:23:11PM +0200, Hans de Goede wrote:
> The blue led on the Mele A1000 is wired to light up as soon as the board
> has powered (it will be on while the gpio is still in input / floating
> mode), also its location on the top-set box clearly signals "power led".
> 
> Until now we've been treating this as a generic usr function led, which
> means that when you plug power into the top-set box, the power-led lights
> and then turns off as soon as the kernel loads, which looks wrong.

I'm not sure I understand the relationship between usr vs pwr led and
the fact that it's disabled.

> This renames the led from a1000:blue:usr to a1000:blue:pwr and marks
> it as default on, fixing this.

however, the default on might. Is it just a confusing commit log, or
am I overlooking something?

thanks,
Maxime
Hans de Goede June 8, 2016, 1:23 p.m. UTC | #5
Hi,

On 07-06-16 23:24, Maxime Ripard wrote:
> On Sun, Jun 05, 2016 at 02:23:11PM +0200, Hans de Goede wrote:
>> The blue led on the Mele A1000 is wired to light up as soon as the board
>> has powered (it will be on while the gpio is still in input / floating
>> mode), also its location on the top-set box clearly signals "power led".
>>
>> Until now we've been treating this as a generic usr function led, which
>> means that when you plug power into the top-set box, the power-led lights
>> and then turns off as soon as the kernel loads, which looks wrong.
>
> I'm not sure I understand the relationship between usr vs pwr led and
> the fact that it's disabled.

There is no relation, other then that pwr leds typically have
default-state = "on"; set whereas usr leds do not.

>> This renames the led from a1000:blue:usr to a1000:blue:pwr and marks
>> it as default on, fixing this.
>
> however, the default on might. Is it just a confusing commit log, or
> am I overlooking something?

Just a slightly confusing commit log.

Regards,

Hans
Maxime Ripard June 11, 2016, 3:45 p.m. UTC | #6
On Wed, Jun 08, 2016 at 03:23:31PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 07-06-16 23:24, Maxime Ripard wrote:
> >On Sun, Jun 05, 2016 at 02:23:11PM +0200, Hans de Goede wrote:
> >>The blue led on the Mele A1000 is wired to light up as soon as the board
> >>has powered (it will be on while the gpio is still in input / floating
> >>mode), also its location on the top-set box clearly signals "power led".
> >>
> >>Until now we've been treating this as a generic usr function led, which
> >>means that when you plug power into the top-set box, the power-led lights
> >>and then turns off as soon as the kernel loads, which looks wrong.
> >
> >I'm not sure I understand the relationship between usr vs pwr led and
> >the fact that it's disabled.
> 
> There is no relation, other then that pwr leds typically have
> default-state = "on"; set whereas usr leds do not.
> 
> >>This renames the led from a1000:blue:usr to a1000:blue:pwr and marks
> >>it as default on, fixing this.
> >
> >however, the default on might. Is it just a confusing commit log, or
> >am I overlooking something?
> 
> Just a slightly confusing commit log.

Ok, applied all three.

Maxime
diff mbox

Patch

diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts
index fa70b8f..39e368e 100644
--- a/arch/arm/boot/dts/sun4i-a10-a1000.dts
+++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts
@@ -72,8 +72,9 @@ 
 		};
 
 		blue {
-			label = "a1000:blue:usr";
+			label = "a1000:blue:pwr";
 			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
 		};
 	};