netfilter: Fix wrong backporting
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / drivers / autotst / lcd_dummy.h
1 /*\r
2  * Copyright (C) 2012 Spreadtrum Communications Inc.
3  *
4  * This software is licensed under the terms of the GNU General Public
5  * License version 2, as published by the Free Software Foundation, and
6  * may be copied, distributed, and modified under those terms.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  */
13
14 #ifndef _LCD_DUMMY_H_\r
15 #define _LCD_DUMMY_H_\r
16 \r
17 /* LCD mode */\r
18 #define LCD_MODE_MCU                    0\r
19 #define LCD_MODE_RGB                    1\r
20 #define LCD_MODE_DSI                    2\r
21 \r
22 /* bus mode */\r
23 #define LCD_BUS_8080                    0\r
24 #define LCD_BUS_6800                    1\r
25 \r
26 /* panel property */\r
27 /* lcdc refresh, TE on, double timing, partial update*/\r
28 #define PANEL_CAP_NORMAL               0x0\r
29 \r
30 /* only not support partial update*/\r
31 #define PANEL_CAP_NOT_PARTIAL_UPDATE   0x1\r
32 \r
33 /* write register, grame have the same timing */\r
34 #define PANEL_CAP_UNIQUE_TIMING        0x2\r
35 \r
36 /* lcd not support TE */\r
37 #define PANEL_CAP_NOT_TEAR_SYNC        0x4\r
38 \r
39 /* only do command/data register, such as some mono oled display device */\r
40 #define PANEL_CAP_MANUAL_REFRESH       0x8\r
41 \r
42 enum{\r
43         SPRDFB_PANEL_TYPE_MCU = 0,\r
44         SPRDFB_PANEL_TYPE_RGB,\r
45         SPRDFB_PANEL_TYPE_MIPI,\r
46         SPRDFB_PANEL_TYPE_LIMIT\r
47 };\r
48 \r
49 enum{\r
50         SPRDFB_POLARITY_POS = 0,\r
51         SPRDFB_POLARITY_NEG,\r
52         SPRDFB_POLARITY_LIMIT\r
53 };\r
54 \r
55 enum{\r
56         SPRDFB_MIPI_MODE_CMD = 0,\r
57         SPRDFB_MIPI_MODE_VIDEO,\r
58         SPRDFB_MIPI_MODE_LIMIT\r
59 };\r
60 \r
61 /* MCU LCD specific properties */\r
62 struct timing_mcu {\r
63         uint16_t rcss; /*unit: ns*/\r
64         uint16_t rlpw;\r
65         uint16_t rhpw;\r
66         uint16_t wcss;\r
67         uint16_t wlpw;\r
68         uint16_t whpw;\r
69 };\r
70 \r
71 /* RGB LCD specific properties */\r
72 struct timing_rgb {\r
73         uint16_t hfp;/*unit: pixel*/\r
74         uint16_t hbp;\r
75         uint16_t hsync;\r
76         uint16_t vfp; /*unit: line*/\r
77         uint16_t vbp;\r
78         uint16_t vsync;\r
79 };\r
80 \r
81 struct info_mipi {\r
82         uint16_t work_mode; /*command_mode, video_mode*/\r
83         uint16_t video_bus_width;\r
84         uint32_t lan_number;\r
85         uint32_t phy_feq;  /*unit:Hz*/\r
86         uint16_t h_sync_pol;\r
87         uint16_t v_sync_pol;\r
88         uint16_t de_pol;\r
89         uint16_t te_pol; /*only for command_mode*/\r
90         uint16_t color_mode_pol;\r
91         uint16_t shut_down_pol;\r
92         struct timing_rgb *timing;\r
93 };\r
94 \r
95 struct info_rgb {\r
96         uint16_t video_bus_width;\r
97         uint16_t h_sync_pol;\r
98         uint16_t v_sync_pol;\r
99         uint16_t de_pol;\r
100         struct timing_rgb *timing;\r
101 };\r
102 \r
103 struct info_mcu {\r
104         uint16_t bus_mode; /*8080, 6800*/\r
105         uint16_t bus_width;\r
106         uint16_t bpp;\r
107         uint16_t te_pol;\r
108         uint32_t te_sync_delay;\r
109         struct timing_mcu *timing;\r
110 };\r
111 \r
112 /* LCD abstraction */\r
113 struct panel_spec {\r
114         uint32_t cap;\r
115         uint16_t width;\r
116         uint16_t height;\r
117         uint16_t type; /*mcu, rgb, mipi*/\r
118         union {\r
119                 struct info_mcu *mcu;\r
120                 struct info_rgb *rgb;\r
121                 struct info_mipi * mipi;\r
122         } info;\r
123 };\r
124 \r
125 #endif\r