lkml.org 
[lkml]   [2005]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: best way to handle LEDs
From
On Wed, November 2, 2005 3:33 pm, Robert Schwebel said:
> On Wed, Nov 02, 2005 at 10:13:34PM +0100, Pavel Machek wrote:
>> We have some leds that are *not* on GPIO pins (like driven by
>> ACPI). We'd like to support those, too.
>
> One more argument to have a LED framework which sits ontop of a lowlevel
> one.
>

Except the led code that is being proposed CAN sit on top of a generic
GPIO layer. If a generic GPIO layer is created, you can create a led
driver that calls out to that GPIO layer.

You just need to fill in the following functions with some that raise and
lower the GPIO on the correct line....

int (*color_get)(struct device *, struct led_properties *props);
void (*color_set)(struct device *, struct led_properties *props, int value);

int (*brightness_get)(struct device *, struct led_properties *props);
void (*brightness_set)(struct device *, struct led_properties *props, int
value);

John

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-03 03:55    [W:0.102 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site