]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/leds.h
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / include / linux / leds.h
index bb50d0151e75c07999de4cb7cff3591f8495c1d6..38c0bd7ca1074af234d516275791d05f945ce1f0 100644 (file)
@@ -13,6 +13,7 @@
 #define __LINUX_LEDS_H_INCLUDED
 
 #include <linux/device.h>
+#include <linux/kernfs.h>
 #include <linux/list.h>
 #include <linux/mutex.h>
 #include <linux/rwsem.h>
@@ -47,6 +48,7 @@ struct led_classdev {
 #define LED_DEV_CAP_FLASH      (1 << 18)
 #define LED_HW_PLUGGABLE       (1 << 19)
 #define LED_PANIC_INDICATOR    (1 << 20)
+#define LED_BRIGHT_HW_CHANGED  (1 << 21)
 
        /* set_brightness_work / blink_timer flags, atomic, private. */
        unsigned long           work_flags;
@@ -111,6 +113,11 @@ struct led_classdev {
        bool                    activated;
 #endif
 
+#ifdef CONFIG_LEDS_BRIGHTNESS_HW_CHANGED
+       int                      brightness_hw_changed;
+       struct kernfs_node      *brightness_hw_changed_kn;
+#endif
+
        /* Ensures consistent access to the LED Flash Class device */
        struct mutex            led_access;
 };
@@ -423,4 +430,12 @@ static inline void ledtrig_cpu(enum cpu_led_event evt)
 }
 #endif
 
+#ifdef CONFIG_LEDS_BRIGHTNESS_HW_CHANGED
+extern void led_classdev_notify_brightness_hw_changed(
+       struct led_classdev *led_cdev, enum led_brightness brightness);
+#else
+static inline void led_classdev_notify_brightness_hw_changed(
+       struct led_classdev *led_cdev, enum led_brightness brightness) { }
+#endif
+
 #endif         /* __LINUX_LEDS_H_INCLUDED */