lin
2025-01-10 2e0fe69425adee0529756dc3381ac1838197f3ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/*
 * drivers/video/sunxi/disp2/disp/lcd/panels.c
 *
 * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
 * Author: zhengxiaobin <zhengxiaobin@allwinnertech.com>
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */
#include "panels.h"
 
struct sunxi_lcd_drv g_lcd_drv;
 
__lcd_panel_t* panel_array[] = {
   &default_panel,
#ifdef CONFIG_LCD_SUPPORT_HE0801A068
   &he0801a068_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_LQ101R1SX03
   &lq101r1sx03_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_LS029B3SX02
   &ls029b3sx02_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_VR_LS055T1SX01
   &vr_ls055t1sx01_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_SL008PN21D
   &sl008pn21d_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_ILI9341
   &ili9341_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_FD055HD003S
   &fd055hd003s_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_TO20T20000
   &to20t20000_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_T30P106
   &t30p106_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_ST7796S
   &st7796s_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_ST7789V
   &st7789v_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_LH219WQ1
   &lh219wq1_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_FRD450H40014
   &frd450h40014_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_H245QBN02
   &h245qbn02_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_S2003T46G
   &s2003t46g_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_LT070ME05000
   &lt070me05000_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_WTQ05027D01
   &wtq05027d01_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_T27P06
   &t27p06_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_DX0960BE40A1
   &dx0960be40a1_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_TFT720X1280
   &tft720x1280_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_S6D7AA0X01
   &S6D7AA0X01_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_INET_DSI_PANEL
   &inet_dsi_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_GG1P4062UTSW
   &gg1p4062utsw_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_VR_SHARP
   &vr_sharp_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_WILLIAMLCD
   &WilliamLcd_panel,
#endif
#if defined(CONFIG_EINK_PANEL_USED)
   &default_eink,
#endif
#if defined(CONFIG_LCD_SUPPORT_BP101WX1)
   &bp101wx1_panel,
#endif
#if defined(CONFIG_LCD_SUPPORT_M133X56)
   &m133x56_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_K101IM2QA04
   &k101im2qa04_panel,
#endif
 
#ifdef CONFIG_LCD_SUPPORT_K101IM2BYL02L
   &k101im2byl02l_panel,
#endif
 
#ifdef CONFIG_LCD_SUPPORT_FX070
   &fx070_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_ST7789V_CPU
   &st7789v_cpu_panel,
#endif
 
#ifdef CONFIG_LCD_SUPPORT_ST7701S
   &st7701s_panel,
#endif
 
#ifdef CONFIG_LCD_SUPPORT_WTL096601G03
   &wtl096601g03_panel,
#endif
 
#ifdef CONFIG_LCD_SUPPORT_M101B31
   &M101B31_panel,
#endif
 
#ifdef CONFIG_LCD_SUPPORT_K101_IM2BYL02_L_800X1280
   &K101_IM2BYL02_L_800X1280_mipi_panel,
#endif
 
   &mipi_8_800x1280_panel,
   &mipi_10_800x1280_panel,
   /* add new panel below */
 
   NULL,
};
 
static void lcd_set_panel_funs(void)
{
   int i;
 
   for (i=0; panel_array[i] != NULL; i++) {
       sunxi_lcd_set_panel_funs(panel_array[i]->name, &panel_array[i]->func);
   }
 
   return ;
}
 
int lcd_init(void)
{
   sunxi_disp_get_source_ops(&g_lcd_drv.src_ops);
   lcd_set_panel_funs();
 
   return 0;
}