Subversion Repositories Kolibri OS

Rev

Rev 6336 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Backlight Lowlevel Control Abstraction
  3.  *
  4.  * Copyright (C) 2003,2004 Hewlett-Packard Company
  5.  *
  6.  */
  7.  
  8. #ifndef _LINUX_BACKLIGHT_H
  9. #define _LINUX_BACKLIGHT_H
  10.  
  11. #include <linux/device.h>
  12. #include <linux/fb.h>
  13. #include <linux/mutex.h>
  14. #include <linux/notifier.h>
  15.  
  16. /* Notes on locking:
  17.  *
  18.  * backlight_device->ops_lock is an internal backlight lock protecting the
  19.  * ops pointer and no code outside the core should need to touch it.
  20.  *
  21.  * Access to update_status() is serialised by the update_lock mutex since
  22.  * most drivers seem to need this and historically get it wrong.
  23.  *
  24.  * Most drivers don't need locking on their get_brightness() method.
  25.  * If yours does, you need to implement it in the driver. You can use the
  26.  * update_lock mutex if appropriate.
  27.  *
  28.  * Any other use of the locks below is probably wrong.
  29.  */
  30.  
  31. enum backlight_update_reason {
  32.         BACKLIGHT_UPDATE_HOTKEY,
  33.         BACKLIGHT_UPDATE_SYSFS,
  34. };
  35.  
  36. enum backlight_type {
  37.         BACKLIGHT_RAW = 1,
  38.         BACKLIGHT_PLATFORM,
  39.         BACKLIGHT_FIRMWARE,
  40.         BACKLIGHT_TYPE_MAX,
  41. };
  42.  
  43. enum backlight_notification {
  44.         BACKLIGHT_REGISTERED,
  45.         BACKLIGHT_UNREGISTERED,
  46. };
  47.  
  48. struct backlight_device;
  49. struct fb_info;
  50. #endif
  51.