diff options
Diffstat (limited to 'include/linux/leds.h')
| -rw-r--r-- | include/linux/leds.h | 37 | 
1 files changed, 23 insertions, 14 deletions
| diff --git a/include/linux/leds.h b/include/linux/leds.h index d2b13066e781..8a3b5d29602f 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -42,15 +42,16 @@ struct led_classdev {  #define LED_UNREGISTERING	(1 << 1)  	/* Upper 16 bits reflect control information */  #define LED_CORE_SUSPENDRESUME	(1 << 16) -#define LED_BLINK_ONESHOT	(1 << 17) -#define LED_BLINK_ONESHOT_STOP	(1 << 18) -#define LED_BLINK_INVERT	(1 << 19) -#define LED_BLINK_BRIGHTNESS_CHANGE (1 << 20) -#define LED_BLINK_DISABLE	(1 << 21) -#define LED_SYSFS_DISABLE	(1 << 22) -#define LED_DEV_CAP_FLASH	(1 << 23) -#define LED_HW_PLUGGABLE	(1 << 24) -#define LED_PANIC_INDICATOR	(1 << 25) +#define LED_BLINK_SW		(1 << 17) +#define LED_BLINK_ONESHOT	(1 << 18) +#define LED_BLINK_ONESHOT_STOP	(1 << 19) +#define LED_BLINK_INVERT	(1 << 20) +#define LED_BLINK_BRIGHTNESS_CHANGE (1 << 21) +#define LED_BLINK_DISABLE	(1 << 22) +#define LED_SYSFS_DISABLE	(1 << 23) +#define LED_DEV_CAP_FLASH	(1 << 24) +#define LED_HW_PLUGGABLE	(1 << 25) +#define LED_PANIC_INDICATOR	(1 << 26)  	/* Set LED brightness level  	 * Must not sleep. Use brightness_set_blocking for drivers @@ -72,8 +73,8 @@ struct led_classdev {  	 * and if both are zero then a sensible default should be chosen.  	 * The call should adjust the timings in that case and if it can't  	 * match the values specified exactly. -	 * Deactivate blinking again when the brightness is set to a fixed -	 * value via the brightness_set() callback. +	 * Deactivate blinking again when the brightness is set to LED_OFF +	 * via the brightness_set() callback.  	 */  	int		(*blink_set)(struct led_classdev *led_cdev,  				     unsigned long *delay_on, @@ -324,10 +325,10 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev)  #endif /* CONFIG_LEDS_TRIGGERS */  /* Trigger specific functions */ -#ifdef CONFIG_LEDS_TRIGGER_IDE_DISK -extern void ledtrig_ide_activity(void); +#ifdef CONFIG_LEDS_TRIGGER_DISK +extern void ledtrig_disk_activity(void);  #else -static inline void ledtrig_ide_activity(void) {} +static inline void ledtrig_disk_activity(void) {}  #endif  #ifdef CONFIG_LEDS_TRIGGER_MTD @@ -386,8 +387,16 @@ struct gpio_led_platform_data {  					unsigned long *delay_off);  }; +#ifdef CONFIG_NEW_LEDS  struct platform_device *gpio_led_register_device(  		int id, const struct gpio_led_platform_data *pdata); +#else +static inline struct platform_device *gpio_led_register_device( +		int id, const struct gpio_led_platform_data *pdata) +{ +	return 0; +} +#endif  enum cpu_led_event {  	CPU_LED_IDLE_START,	/* CPU enters idle */ |