]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/leds.h
leds: triggers: Allow to switch the trigger to "panic" on a kernel panic
[linux.git] / include / linux / leds.h
index bc1476fda96eb3206995b270e32cb54a49305eea..7e9fb00e15e8b71cde2d4ceccaa875d7ab0da0f2 100644 (file)
@@ -39,6 +39,7 @@ struct led_classdev {
 
        /* Lower 16 bits reflect status */
 #define LED_SUSPENDED          (1 << 0)
+#define LED_UNREGISTERING      (1 << 1)
        /* Upper 16 bits reflect control information */
 #define LED_CORE_SUSPENDRESUME (1 << 16)
 #define LED_BLINK_ONESHOT      (1 << 17)
@@ -48,9 +49,13 @@ struct led_classdev {
 #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)
 
-       /* Set LED brightness level */
-       /* Must not sleep, use a workqueue if needed */
+       /* Set LED brightness level
+        * Must not sleep. Use brightness_set_blocking for drivers
+        * that can sleep while setting brightness.
+        */
        void            (*brightness_set)(struct led_classdev *led_cdev,
                                          enum led_brightness brightness);
        /*
@@ -325,6 +330,12 @@ extern void ledtrig_ide_activity(void);
 static inline void ledtrig_ide_activity(void) {}
 #endif
 
+#ifdef CONFIG_LEDS_TRIGGER_MTD
+extern void ledtrig_mtd_activity(void);
+#else
+static inline void ledtrig_mtd_activity(void) {}
+#endif
+
 #if defined(CONFIG_LEDS_TRIGGER_CAMERA) || defined(CONFIG_LEDS_TRIGGER_CAMERA_MODULE)
 extern void ledtrig_flash_ctrl(bool on);
 extern void ledtrig_torch_ctrl(bool on);