aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/backlight.h
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2009-07-14 12:06:02 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2009-09-21 16:03:58 -0400
commit325253a6b2de4bdfa9ef0e28b5df8a4a4fe2b677 (patch)
treea9fff6fda2ac9f36b494779e76e66222ce540b28 /include/linux/backlight.h
parent0f7e7273803aa03ad7a0e210461a3db9d35e7abb (diff)
backlight: Allow drivers to update the core, and generate events on changes
Certain hardware will send us events when the backlight brightness changes. Add a function to update the value in the core, and additionally send a uevent so that userspace can pop up appropriate UI. The uevents are flagged depending on whether the update originated in the kernel or from userspace, making it easier to only display UI at the appropriate time. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'include/linux/backlight.h')
-rw-r--r--include/linux/backlight.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index 79ca2da81c8..0f5f57858a2 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -27,6 +27,11 @@
27 * Any other use of the locks below is probably wrong. 27 * Any other use of the locks below is probably wrong.
28 */ 28 */
29 29
30enum backlight_update_reason {
31 BACKLIGHT_UPDATE_HOTKEY,
32 BACKLIGHT_UPDATE_SYSFS,
33};
34
30struct backlight_device; 35struct backlight_device;
31struct fb_info; 36struct fb_info;
32 37
@@ -100,6 +105,8 @@ static inline void backlight_update_status(struct backlight_device *bd)
100extern struct backlight_device *backlight_device_register(const char *name, 105extern struct backlight_device *backlight_device_register(const char *name,
101 struct device *dev, void *devdata, struct backlight_ops *ops); 106 struct device *dev, void *devdata, struct backlight_ops *ops);
102extern void backlight_device_unregister(struct backlight_device *bd); 107extern void backlight_device_unregister(struct backlight_device *bd);
108extern void backlight_force_update(struct backlight_device *bd,
109 enum backlight_update_reason reason);
103 110
104#define to_backlight_device(obj) container_of(obj, struct backlight_device, dev) 111#define to_backlight_device(obj) container_of(obj, struct backlight_device, dev)
105 112