1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#include <linux/module.h>
25#include <linux/platform_device.h>
26
27#include <mach/gpio.h>
28#include <mach/mux.h>
29#include <mach/omapfb.h>
30
31
32
33static int apollon_panel_init(struct lcd_panel *panel,
34 struct omapfb_device *fbdev)
35{
36
37 omap_cfg_reg(M21_242X_GPIO11);
38 return 0;
39}
40
41static void apollon_panel_cleanup(struct lcd_panel *panel)
42{
43}
44
45static int apollon_panel_enable(struct lcd_panel *panel)
46{
47 return 0;
48}
49
50static void apollon_panel_disable(struct lcd_panel *panel)
51{
52}
53
54static unsigned long apollon_panel_get_caps(struct lcd_panel *panel)
55{
56 return 0;
57}
58
59struct lcd_panel apollon_panel = {
60 .name = "apollon",
61 .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
62 OMAP_LCDC_INV_HSYNC,
63
64 .bpp = 16,
65 .data_lines = 18,
66#ifdef USE_35INCH_LCD
67 .x_res = 240,
68 .y_res = 320,
69 .hsw = 2,
70 .hfp = 3,
71 .hbp = 9,
72 .vsw = 4,
73 .vfp = 3,
74 .vbp = 5,
75#else
76 .x_res = 480,
77 .y_res = 272,
78 .hsw = 41,
79 .hfp = 2,
80 .hbp = 2,
81 .vsw = 10,
82 .vfp = 2,
83 .vbp = 2,
84#endif
85 .pixel_clock = 6250,
86
87 .init = apollon_panel_init,
88 .cleanup = apollon_panel_cleanup,
89 .enable = apollon_panel_enable,
90 .disable = apollon_panel_disable,
91 .get_caps = apollon_panel_get_caps,
92};
93
94static int apollon_panel_probe(struct platform_device *pdev)
95{
96 omapfb_register_panel(&apollon_panel);
97 return 0;
98}
99
100static int apollon_panel_remove(struct platform_device *pdev)
101{
102 return 0;
103}
104
105static int apollon_panel_suspend(struct platform_device *pdev,
106 pm_message_t mesg)
107{
108 return 0;
109}
110
111static int apollon_panel_resume(struct platform_device *pdev)
112{
113 return 0;
114}
115
116struct platform_driver apollon_panel_driver = {
117 .probe = apollon_panel_probe,
118 .remove = apollon_panel_remove,
119 .suspend = apollon_panel_suspend,
120 .resume = apollon_panel_resume,
121 .driver = {
122 .name = "apollon_lcd",
123 .owner = THIS_MODULE,
124 },
125};
126
127static int __init apollon_panel_drv_init(void)
128{
129 return platform_driver_register(&apollon_panel_driver);
130}
131
132static void __exit apollon_panel_drv_exit(void)
133{
134 platform_driver_unregister(&apollon_panel_driver);
135}
136
137module_init(apollon_panel_drv_init);
138module_exit(apollon_panel_drv_exit);
139