public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <ext-roger.quadros@nokia.com>
To: ext Kevin Hilman <khilman@deeprootsystems.com>
Cc: Jonathan McDowell <noodles@earth.li>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] OMAP3: RX51: support sleep indicator LEDs
Date: Mon, 05 Oct 2009 14:31:46 +0300	[thread overview]
Message-ID: <4AC9D922.6090409@nokia.com> (raw)
In-Reply-To: <87tyyh7orh.fsf@deeprootsystems.com>

ext Kevin Hilman wrote:
> Jonathan McDowell <noodles@earth.li> writes:
> 
>> On Fri, Oct 02, 2009 at 08:35:55AM -0700, Kevin Hilman wrote:
>>> The sleep indicator LEDs can be enabled/disabled by toggling GPIO162.
>>> Request this GPIO in RX51 board init, disable by default and expose
>>> GPIO162 to userspace so LEDs can be toggled from userspace:
>> Wouldn't this be better done using the LED class subsystem?
> 
> No, these are HW controlled LEDs which blink based on whether the OMAP
> is hitting retention or OFF mode etc.  The software has no control
> over the blinking of LEDs themselves.  The GPIO simply enables them.
> 
> Kevin
> 

Actually, i think it would make sense to use LED class subsystem, even if the 
GPIO does not directly control LEDs because

1) it does indirectly control a group of LEDs. enable/disable

2) it solves our GPIO numbering problem. user-space does not need to care about 
or track which GPIO to set/reset

3) Makes better sense from architecture point of view

	User-space will write to /sys/class/leds/debug_leds/brightness

-roger

> 
>>> To enable:
>>>
>>>   # echo 1 > /sys/class/gpio/gpio162/value
>>>
>>> To disable:
>>>
>>>   # echo 0 > /sys/class/gpio/gpio162/value
>>>
>>> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
>>> ---
>> J.
>>
>> -- 
>> 101 things you can't have too much of : 16 - Time.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2009-10-05 11:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02 15:35 [PATCH] OMAP3: RX51: support sleep indicator LEDs Kevin Hilman
2009-10-02 15:59 ` Jonathan McDowell
2009-10-02 16:18   ` Kevin Hilman
2009-10-05 11:31     ` Roger Quadros [this message]
2009-10-05 11:02 ` Roger Quadros

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=4AC9D922.6090409@nokia.com \
    --to=ext-roger.quadros@nokia.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=noodles@earth.li \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox