linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: Gregy <p.gregy@gmail.com>,
	reinette chatre <reinette.chatre@intel.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Richard Purdie <rpurdie@openedhand.com>
Subject: Re: Iwlwifi and LEDS?
Date: Fri, 28 May 2010 17:08:14 +0200	[thread overview]
Message-ID: <1275059294.3909.112.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1275058729.24079.1488.camel@rex>

On Fri, 2010-05-28 at 15:58 +0100, Richard Purdie wrote:

> > The proper way to do this now would be to rewrite the LED code in
> > iwlwifi to:
> > 
> > 1) register an LED again, which implements the blink_set() callback and
> > programs the hw accordingly. This is essentially implementing
> > iwl_led_pattern(), but with on_time/off_time parameters.
> > 
> > 2) Convert the current caller of iwl_led_pattern() to be an LED trigger
> > that registers with the LED system. It would call the blink_set() for
> > the LED it is connected to. Ideally, there should be some common
> > software emulation if the LED has no blink_set(). Richard, is there a
> > "make LED blink" callback that would start a timer for that LED? The
> > timer trigger uses it but doesn't seem to be usable itself for other
> > triggers?
> > 
> > 3) start the LED on device start, stop it on device stop
> > 
> > 4) depending on the module's led_mode, connect the LED to the
> > appropriate default trigger, e.g. mac80211's assoc trigger or normally
> > of course the new iwlwifi-blink trigger.
> 
> I have to admit I don't fully understand what the capabilities of your
> hardware are.

Sorry, I didn't mean to confuse you with the hardware details. The
hardware can blink, essentially.

> Certainly registering a trigger with the LED system, maybe only
> appearing for this specific hardware sounds like the way to go. Since
> this will only appear as a trigger for this hardware, the trigger can
> then poke whatever it needs into the hardware to work as a traffic
> indication?

Yes, that would be one way. However, that would seem to unduly restrict
the trigger's use. It can be used with any LED that has a blink_set()
callback since it doesn't need to poke the hardware directly.

What I was wondering is if there is (or should be) a common "blink
emulation" for LEDs that don't have a blink_set, so instead of calling
	led->blink_set(...)
I would call
	led_blink_set(...)
and that would start the timer etc.

johannes


      reply	other threads:[~2010-05-28 15:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21  9:11 Iwlwifi and LEDS? Gregy
2010-05-21 18:07 ` Abhijeet Kolekar
2010-05-21 20:49   ` Gregy
2010-05-24 22:30     ` reinette chatre
2010-05-27 20:14       ` Gregy
2010-05-28  5:39         ` reinette chatre
2010-05-28 11:01           ` Gregy
2010-05-28 11:22             ` Johannes Berg
2010-05-28 14:58               ` Richard Purdie
2010-05-28 15:08                 ` Johannes Berg [this message]

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=1275059294.3909.112.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=p.gregy@gmail.com \
    --cc=reinette.chatre@intel.com \
    --cc=rpurdie@openedhand.com \
    --cc=rpurdie@rpsys.net \
    /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;
as well as URLs for NNTP newsgroup(s).