]> Pileus Git - ~andy/linux/blobdiff - include/linux/fb.h
[PATCH] Detaching fbcon: sdd sysfs class device entry for fbcon
[~andy/linux] / include / linux / fb.h
index d03fadfcafe37461c18d22fdb6b7ac6840be42ab..c64f25255286da6fecd18f3beddb1aadaba05891 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _LINUX_FB_H
 #define _LINUX_FB_H
 
+#include <linux/backlight.h>
 #include <asm/types.h>
 
 /* Definitions of frame buffers                                                */
@@ -366,6 +367,12 @@ struct fb_cursor {
        struct fb_image image;  /* Cursor image */
 };
 
+#ifdef CONFIG_FB_BACKLIGHT
+/* Settings for the generic backlight code */
+#define FB_BACKLIGHT_LEVELS    128
+#define FB_BACKLIGHT_MAX       0xFF
+#endif
+
 #ifdef __KERNEL__
 
 #include <linux/fs.h>
@@ -508,12 +515,6 @@ struct fb_cursor_user {
 /*     The resolution of the passed in fb_info about to change and
         all vc's should be changed         */
 #define FB_EVENT_MODE_CHANGE_ALL       0x0A
-/*      CONSOLE-SPECIFIC: set console rotation */
-#define FB_EVENT_SET_CON_ROTATE         0x0B
-/*      CONSOLE-SPECIFIC: get console rotation */
-#define FB_EVENT_GET_CON_ROTATE         0x0C
-/*      CONSOLE-SPECIFIC: rotate all consoles */
-#define FB_EVENT_SET_CON_ROTATE_ALL     0x0D
 
 struct fb_event {
        struct fb_info *info;
@@ -756,6 +757,21 @@ struct fb_info {
        struct fb_cmap cmap;            /* Current cmap */
        struct list_head modelist;      /* mode list */
        struct fb_videomode *mode;      /* current mode */
+
+#ifdef CONFIG_FB_BACKLIGHT
+       /* Lock ordering:
+        * bl_mutex (protects bl_dev and bl_curve)
+        *   bl_dev->sem (backlight class)
+        */
+       struct mutex bl_mutex;
+
+       /* assigned backlight device */
+       struct backlight_device *bl_dev;
+
+       /* Backlight level curve */
+       u8 bl_curve[FB_BACKLIGHT_LEVELS];
+#endif
+
        struct fb_ops *fbops;
        struct device *device;
        struct class_device *class_device; /* sysfs per device attrs */
@@ -839,12 +855,10 @@ struct fb_info {
 #define FB_LEFT_POS(bpp)          (32 - bpp)
 #define FB_SHIFT_HIGH(val, bits)  ((val) >> (bits))
 #define FB_SHIFT_LOW(val, bits)   ((val) << (bits))
-#define FB_BIT_NR(b)              (7 - (b))
 #else
 #define FB_LEFT_POS(bpp)          (0)
 #define FB_SHIFT_HIGH(val, bits)  ((val) << (bits))
 #define FB_SHIFT_LOW(val, bits)   ((val) >> (bits))
-#define FB_BIT_NR(b)              (b)
 #endif
 
     /*
@@ -872,7 +886,6 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var,
                              struct fb_fix_screeninfo *fix);
 extern int fb_get_options(char *name, char **option);
 extern int fb_new_modelist(struct fb_info *info);
-extern int fb_con_duit(struct fb_info *info, int event, void *data);
 
 extern struct fb_info *registered_fb[FB_MAX];
 extern int num_registered_fb;
@@ -897,6 +910,7 @@ extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
 extern void framebuffer_release(struct fb_info *info);
 extern int fb_init_class_device(struct fb_info *fb_info);
 extern void fb_cleanup_class_device(struct fb_info *head);
+extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max);
 
 /* drivers/video/fbmon.c */
 #define FB_MAXTIMINGS          0