Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Header file for TI DA8XX LCD controller platform data.
0003  *
0004  * Copyright (C) 2008-2009 MontaVista Software Inc.
0005  * Copyright (C) 2008-2009 Texas Instruments Inc
0006  *
0007  * This file is licensed under the terms of the GNU General Public License
0008  * version 2. This program is licensed "as is" without any warranty of any
0009  * kind, whether express or implied.
0010  */
0011 
0012 #ifndef DA8XX_FB_H
0013 #define DA8XX_FB_H
0014 
0015 enum panel_shade {
0016     MONOCHROME = 0,
0017     COLOR_ACTIVE,
0018     COLOR_PASSIVE,
0019 };
0020 
0021 enum raster_load_mode {
0022     LOAD_DATA = 1,
0023     LOAD_PALETTE,
0024 };
0025 
0026 enum da8xx_frame_complete {
0027     DA8XX_FRAME_WAIT,
0028     DA8XX_FRAME_NOWAIT,
0029 };
0030 
0031 struct da8xx_lcdc_platform_data {
0032     const char manu_name[10];
0033     void *controller_data;
0034     const char type[25];
0035 };
0036 
0037 struct lcd_ctrl_config {
0038     enum panel_shade panel_shade;
0039 
0040     /* AC Bias Pin Frequency */
0041     int ac_bias;
0042 
0043     /* AC Bias Pin Transitions per Interrupt */
0044     int ac_bias_intrpt;
0045 
0046     /* DMA burst size */
0047     int dma_burst_sz;
0048 
0049     /* Bits per pixel */
0050     int bpp;
0051 
0052     /* FIFO DMA Request Delay */
0053     int fdd;
0054 
0055     /* TFT Alternative Signal Mapping (Only for active) */
0056     unsigned char tft_alt_mode;
0057 
0058     /* 12 Bit Per Pixel (5-6-5) Mode (Only for passive) */
0059     unsigned char stn_565_mode;
0060 
0061     /* Mono 8-bit Mode: 1=D0-D7 or 0=D0-D3 */
0062     unsigned char mono_8bit_mode;
0063 
0064     /* Horizontal and Vertical Sync Edge: 0=rising 1=falling */
0065     unsigned char sync_edge;
0066 
0067     /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */
0068     unsigned char raster_order;
0069 
0070     /* DMA FIFO threshold */
0071     int fifo_th;
0072 };
0073 
0074 struct lcd_sync_arg {
0075     int back_porch;
0076     int front_porch;
0077     int pulse_width;
0078 };
0079 
0080 /* ioctls */
0081 #define FBIOGET_CONTRAST    _IOR('F', 1, int)
0082 #define FBIOPUT_CONTRAST    _IOW('F', 2, int)
0083 #define FBIGET_BRIGHTNESS   _IOR('F', 3, int)
0084 #define FBIPUT_BRIGHTNESS   _IOW('F', 3, int)
0085 #define FBIGET_COLOR        _IOR('F', 5, int)
0086 #define FBIPUT_COLOR        _IOW('F', 6, int)
0087 #define FBIPUT_HSYNC        _IOW('F', 9, int)
0088 #define FBIPUT_VSYNC        _IOW('F', 10, int)
0089 
0090 /* Proprietary FB_SYNC_ flags */
0091 #define FB_SYNC_CLK_INVERT 0x40000000
0092 
0093 #endif  /* ifndef DA8XX_FB_H */
0094