mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Pavel Machek <pavel@suse.cz>
Cc: John Lenz <lenz@cs.wisc.edu>, kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] new class for led devices
Date: Fri, 24 Sep 2004 09:01:39 +0200	[thread overview]
Message-ID: <20040924070139.GA1189@ucw.cz> (raw)
In-Reply-To: <20040923180212.GE6412@elf.ucw.cz>

On Thu, Sep 23, 2004 at 08:02:12PM +0200, Pavel Machek wrote:
> Hi!
> 
> > >> >Well, we already have an interface for setting LEDs through the input
> > >> >layer, it'd be trivial to create an input device driver with just  
> > >> >LEDs
> > >> >and no buttons/keys ...
> > >> >
> > >> 
> > >> It's not really a nice fit with what we are trying to do.  In the input  
> > >> layer, there is a whole list of led types, none of which make sense...  
> > >> For example, on the Sharp Zaurus, we have two leds, one green, one  
> > >> amber.  Which one is LED_NUML?  We don't enforce anything on the policy  
> > >> userspace has for the leds, sometimes it might use the amber led to let  
> > >> the user know they have new mail, and sometimes to show the power is  
> > >> plugged in, sometimes for something else (maybe even that caps lock or  
> > >> numlock is on).
> > >
> > >Actually on zaurus one led is labeled "CHARGING" and second is labeled
> > >"MAIL". There are PC keyboards with "MAIL" led already, I
> > >believe... It does not seem to be that bad fit. I do not think you
> > >want to label leds by colors, machine may well have three green leds
> > >(see normal pc keyboard). And on most machines you do not even know
> > >what color the leds are (new notebooks like blue leds :-().
> > >
> > >So right solution seems to be adding LED_MAIL and LED_CHARGING and be
> > >done with that...
> > 
> > Yeah, that would work.  And if userspace wants to use the led for something
> > else, just uses MAIL and CHARGING as the names of the leds.
> 
> Looks good to me.
> 
> There's LED_MAX defined to be 0xf. Can we support more than 16 leds?
 
It's a constant that can be changed without breaking anything. Old apps
will keep working (but will only have access to the first 16),
recompiled apps will have access to all. So I think we can leave it as
it is for now and when need arises we can change it.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

  reply	other threads:[~2004-09-24  7:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-22  5:07 John Lenz
2004-09-22  7:27 ` Vojtech Pavlik
2004-09-22 19:53   ` John Lenz
2004-09-22 22:07     ` Pavel Machek
2004-09-23 17:28       ` John Lenz
2004-09-23 18:02         ` Pavel Machek
2004-09-24  7:01           ` Vojtech Pavlik [this message]
2004-09-24  8:30         ` Vojtech Pavlik
2004-09-22  7:54 ` Geert Uytterhoeven

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=20040924070139.GA1189@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=lenz@cs.wisc.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    /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

all inboxes | Powered by JetHome®