/* LCD description */ struct s3c2410fb_display { /* LCD type */ unsigned type; /* Screen size */ unsignedshort width; unsignedshort height; /* Screen info */ unsignedshort xres; unsignedshort yres; unsignedshort bpp; unsigned pixclock;/* pixclock in picoseconds */ unsignedshort left_margin;/* value in pixels (TFT) or HCLKs (STN) */ unsignedshort right_margin;/* value in pixels (TFT) or HCLKs (STN) */ unsignedshort hsync_len;/* value in pixels (TFT) or HCLKs (STN) */ unsignedshort upper_margin;/* value in lines (TFT) or 0 (STN) */ unsignedshort lower_margin;/* value in lines (TFT) or 0 (STN) */ unsignedshort vsync_len;/* value in lines (TFT) or 0 (STN) */ /* lcd configuration registers */ unsignedlong lcdcon5; };
struct s3c2410fb_mach_info { struct s3c2410fb_display *displays;/* attached diplays info */ unsigned num_displays;/* number of defined displays */ unsigned default_display; /* GPIOs */ unsignedlong gpcup; unsignedlong gpcup_mask; unsignedlong gpccon; unsignedlong gpccon_mask; unsignedlong gpdup; unsignedlong gpdup_mask; unsignedlong gpdcon; unsignedlong gpdcon_mask; /* lpc3600 control register */ unsignedlong lpcsel; };
下面的结构定义于include/linux/fb.h
struct fb_info { int node; int flags; struct fb_var_screeninfo var;/* Current var */ struct fb_fix_screeninfo fix;/* Current fix */ struct fb_monspecs monspecs;/* Current Monitor specs */ struct work_struct queue;/* Framebuffer event queue */ struct fb_pixmap pixmap;/* Image hardware mapper */ struct fb_pixmap sprite;/* Cursor hardware mapper */ struct fb_cmap cmap;/* Current cmap */ struct list_head modelist;/* mode list */ struct fb_videomode *mode;/* current mode */ #ifdef CONFIG_FB_BACKLIGHT /* assigned backlight device */ /* set before framebuffer registration, remove after unregister */ struct backlight_device *bl_dev; /* Backlight level curve */ struct mutex bl_curve_mutex; u8 bl_curve[FB_BACKLIGHT_LEVELS]; #endif #ifdef CONFIG_FB_DEFERRED_IO struct delayed_work deferred_work; struct fb_deferred_io *fbdefio; #endif struct fb_ops *fbops; struct device *device;/* This is the parent */ struct device *dev;/* This is this fb device */ int class_flag;/* private sysfs flags */ #ifdef CONFIG_FB_TILEBLITTING struct fb_tile_ops *tileops;/* Tile Blitting */ #endif char __iomem *screen_base;/* Virtual address */ unsignedlong screen_size;/* Amount of ioremapped VRAM or 0 */ void*pseudo_palette;/* Fake palette of 16 colors */ #define FBINFO_STATE_RUNNING 0 #define FBINFO_STATE_SUSPENDED 1 u32 state;/* Hardware state i.e suspend */ void*fbcon_par;/* fbcon use-only private area */ /* From here on everything is device dependent */ void*par; };