Re: [RFC PATCH 1/8] LED: Add LED Class

From: David Vrabel
Date: Mon Dec 05 2005 - 09:58:36 EST


This LED subsystem isn't usable with LEDs that are controlled by I2C
GPIO devices. Getting rid of (struct led_device).lock would go some way
to making it work. It's not clear to me why it's needed anyway.

Suspend and resume probably needs to be LED specific.

Richard Purdie wrote:
> Index: linux-2.6.15-rc2/drivers/leds/Kconfig
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ linux-2.6.15-rc2/drivers/leds/Kconfig 2005-12-05 11:29:19.000000000 +0000
> @@ -0,0 +1,18 @@
> +
> +menu "LED devices"
> +
> +config NEW_LEDS

Is there a better name than NEW_LEDS? It won't be 'new' for very long...

> Index: linux-2.6.15-rc2/include/linux/leds.h
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ linux-2.6.15-rc2/include/linux/leds.h 2005-12-05 11:29:19.000000000 +0000
> [...]
> + /* A function to set the brightness of the led.
> + * Values are between 0-100 */
> + void (*brightness_set)(struct led_device *led_dev, int value);

0-255 is probably a better range to use. Might be worth having an enum
like.

enum led_brightness {
LED_OFF = 0, LED_HALF_BRIGHT = 127, LED_FULL_BRIGHT = 255,
};

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