1 /* Public domain. */ 2 3 #ifndef _LINUX_BACKLIGHT_H 4 #define _LINUX_BACKLIGHT_H 5 6 #include <sys/task.h> 7 8 struct backlight_device; 9 10 struct backlight_properties { 11 int type; 12 int max_brightness; 13 int brightness; 14 int power; 15 }; 16 17 struct backlight_ops { 18 int (*update_status)(struct backlight_device *); 19 int (*get_brightness)(struct backlight_device *); 20 }; 21 22 struct backlight_device { 23 const struct backlight_ops *ops; 24 struct backlight_properties props; 25 struct task task; 26 void *data; 27 }; 28 29 #define bl_get_data(bd) (bd)->data 30 31 #define BACKLIGHT_RAW 0 32 #define BACKLIGHT_FIRMWARE 1 33 34 struct backlight_device *backlight_device_register(const char *, void *, 35 void *, const struct backlight_ops *, struct backlight_properties *); 36 void backlight_device_unregister(struct backlight_device *); 37 38 static inline void 39 backlight_update_status(struct backlight_device *bd) 40 { 41 bd->ops->update_status(bd); 42 } 43 44 void backlight_schedule_update_status(struct backlight_device *); 45 46 #endif 47