diff options
Diffstat (limited to 'include/linux/leds.h')
-rw-r--r-- | include/linux/leds.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h index 0201f6f51cea..519df72e939d 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -35,8 +35,11 @@ struct led_classdev { | |||
35 | #define LED_SUSPENDED (1 << 0) | 35 | #define LED_SUSPENDED (1 << 0) |
36 | 36 | ||
37 | /* Set LED brightness level */ | 37 | /* Set LED brightness level */ |
38 | /* Must not sleep, use a workqueue if needed */ | ||
38 | void (*brightness_set)(struct led_classdev *led_cdev, | 39 | void (*brightness_set)(struct led_classdev *led_cdev, |
39 | enum led_brightness brightness); | 40 | enum led_brightness brightness); |
41 | /* Get LED brightness level */ | ||
42 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); | ||
40 | 43 | ||
41 | /* Activate hardware accelerated blink */ | 44 | /* Activate hardware accelerated blink */ |
42 | int (*blink_set)(struct led_classdev *led_cdev, | 45 | int (*blink_set)(struct led_classdev *led_cdev, |
@@ -59,15 +62,7 @@ struct led_classdev { | |||
59 | 62 | ||
60 | extern int led_classdev_register(struct device *parent, | 63 | extern int led_classdev_register(struct device *parent, |
61 | struct led_classdev *led_cdev); | 64 | struct led_classdev *led_cdev); |
62 | extern void __led_classdev_unregister(struct led_classdev *led_cdev, bool sus); | 65 | extern void led_classdev_unregister(struct led_classdev *lcd); |
63 | static inline void led_classdev_unregister(struct led_classdev *lcd) | ||
64 | { | ||
65 | __led_classdev_unregister(lcd, false); | ||
66 | } | ||
67 | static inline void led_classdev_unregister_suspended(struct led_classdev *lcd) | ||
68 | { | ||
69 | __led_classdev_unregister(lcd, true); | ||
70 | } | ||
71 | extern void led_classdev_suspend(struct led_classdev *led_cdev); | 66 | extern void led_classdev_suspend(struct led_classdev *led_cdev); |
72 | extern void led_classdev_resume(struct led_classdev *led_cdev); | 67 | extern void led_classdev_resume(struct led_classdev *led_cdev); |
73 | 68 | ||
@@ -134,6 +129,9 @@ struct gpio_led { | |||
134 | struct gpio_led_platform_data { | 129 | struct gpio_led_platform_data { |
135 | int num_leds; | 130 | int num_leds; |
136 | struct gpio_led *leds; | 131 | struct gpio_led *leds; |
132 | int (*gpio_blink_set)(unsigned gpio, | ||
133 | unsigned long *delay_on, | ||
134 | unsigned long *delay_off); | ||
137 | }; | 135 | }; |
138 | 136 | ||
139 | 137 | ||