[at91] Allow module compilation for adc driver
[openwrt.git] / target / linux / omap24xx / patches-2.6.37 / 700-video-omap.patch
1 Index: linux-2.6.37-rc1/drivers/video/omap/dispc.c
2 ===================================================================
3 --- linux-2.6.37-rc1.orig/drivers/video/omap/dispc.c 2010-11-01 12:54:12.000000000 +0100
4 +++ linux-2.6.37-rc1/drivers/video/omap/dispc.c 2010-11-05 17:04:58.562000054 +0100
5 @@ -190,6 +190,11 @@
6 struct omapfb_color_key color_key;
7 } dispc;
8
9 +struct platform_device omapdss_device = {
10 + .name = "omapdss",
11 + .id = -1,
12 +};
13 +
14 static void enable_lcd_clocks(int enable);
15
16 static void inline dispc_write_reg(int idx, u32 val)
17 @@ -916,20 +921,20 @@
18
19 static int get_dss_clocks(void)
20 {
21 - dispc.dss_ick = clk_get(&dispc.fbdev->dssdev->dev, "ick");
22 + dispc.dss_ick = clk_get(&omapdss_device.dev, "ick");
23 if (IS_ERR(dispc.dss_ick)) {
24 dev_err(dispc.fbdev->dev, "can't get ick\n");
25 return PTR_ERR(dispc.dss_ick);
26 }
27
28 - dispc.dss1_fck = clk_get(&dispc.fbdev->dssdev->dev, "dss1_fck");
29 + dispc.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck");
30 if (IS_ERR(dispc.dss1_fck)) {
31 dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
32 clk_put(dispc.dss_ick);
33 return PTR_ERR(dispc.dss1_fck);
34 }
35
36 - dispc.dss_54m_fck = clk_get(&dispc.fbdev->dssdev->dev, "tv_fck");
37 + dispc.dss_54m_fck = clk_get(&omapdss_device.dev, "tv_fck");
38 if (IS_ERR(dispc.dss_54m_fck)) {
39 dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
40 clk_put(dispc.dss_ick);
41 @@ -1381,6 +1386,12 @@
42 int skip_init = 0;
43 int i;
44
45 + r = platform_device_register(&omapdss_device);
46 + if (r) {
47 + dev_err(fbdev->dev, "can't register omapdss device\n");
48 + return r;
49 + }
50 +
51 memset(&dispc, 0, sizeof(dispc));
52
53 dispc.base = ioremap(DISPC_BASE, SZ_1K);
54 @@ -1524,6 +1535,7 @@
55 free_irq(INT_24XX_DSS_IRQ, dispc.fbdev);
56 put_dss_clocks();
57 iounmap(dispc.base);
58 + platform_device_unregister(&omapdss_device);
59 }
60
61 const struct lcd_ctrl omap2_int_ctrl = {
62 Index: linux-2.6.37-rc1/drivers/video/omap/lcd_htcherald.c
63 ===================================================================
64 --- linux-2.6.37-rc1.orig/drivers/video/omap/lcd_htcherald.c 2010-11-01 12:54:12.000000000 +0100
65 +++ linux-2.6.37-rc1/drivers/video/omap/lcd_htcherald.c 2010-11-05 17:04:58.562000054 +0100
66 @@ -115,12 +115,12 @@
67 },
68 };
69
70 -static int __init htcherald_panel_drv_init(void)
71 +static int htcherald_panel_drv_init(void)
72 {
73 return platform_driver_register(&htcherald_panel_driver);
74 }
75
76 -static void __exit htcherald_panel_drv_cleanup(void)
77 +static void htcherald_panel_drv_cleanup(void)
78 {
79 platform_driver_unregister(&htcherald_panel_driver);
80 }
81 Index: linux-2.6.37-rc1/drivers/video/omap/lcd_mipid.c
82 ===================================================================
83 --- linux-2.6.37-rc1.orig/drivers/video/omap/lcd_mipid.c 2010-11-01 12:54:12.000000000 +0100
84 +++ linux-2.6.37-rc1/drivers/video/omap/lcd_mipid.c 2010-11-05 17:04:58.563000039 +0100
85 @@ -551,9 +551,9 @@
86 md->esd_check = ls041y3_esd_check;
87 break;
88 default:
89 - md->panel.name = "unknown";
90 - dev_err(&md->spi->dev, "invalid display ID\n");
91 - return -ENODEV;
92 + dev_err(&md->spi->dev, "FIXME: LCD panel detection failed! ID: %02x%02x%02x\n", display_id[0], display_id[1], display_id[2]);
93 + md->panel.name = "ls041y3";
94 + md->esd_check = ls041y3_esd_check;
95 }
96
97 md->revision = display_id[1];
98 Index: linux-2.6.37-rc1/drivers/video/omap/omapfb.h
99 ===================================================================
100 --- linux-2.6.37-rc1.orig/drivers/video/omap/omapfb.h 2010-11-01 12:54:12.000000000 +0100
101 +++ linux-2.6.37-rc1/drivers/video/omap/omapfb.h 2010-11-05 17:04:58.563000039 +0100
102 @@ -203,8 +203,6 @@
103
104 struct omapfb_mem_desc mem_desc;
105 struct fb_info *fb_info[OMAPFB_PLANE_NUM];
106 -
107 - struct platform_device *dssdev; /* dummy dev for clocks */
108 };
109
110 #ifdef CONFIG_ARCH_OMAP1
111 @@ -226,4 +224,6 @@
112 void (*callback)(void *),
113 void *callback_data);
114
115 +extern struct platform_device omapdss_device;
116 +
117 #endif /* __OMAPFB_H */
118 Index: linux-2.6.37-rc1/drivers/video/omap/omapfb_main.c
119 ===================================================================
120 --- linux-2.6.37-rc1.orig/drivers/video/omap/omapfb_main.c 2010-11-01 12:54:12.000000000 +0100
121 +++ linux-2.6.37-rc1/drivers/video/omap/omapfb_main.c 2010-11-05 17:04:58.563000039 +0100
122 @@ -84,19 +84,6 @@
123 { 1 << OMAPFB_COLOR_YUY422, "YUY422", },
124 };
125
126 -static void omapdss_release(struct device *dev)
127 -{
128 -}
129 -
130 -/* dummy device for clocks */
131 -static struct platform_device omapdss_device = {
132 - .name = "omapdss",
133 - .id = -1,
134 - .dev = {
135 - .release = omapdss_release,
136 - },
137 -};
138 -
139 /*
140 * ---------------------------------------------------------------------------
141 * LCD panel
142 @@ -1715,7 +1702,6 @@
143
144 fbdev->dev = &pdev->dev;
145 fbdev->panel = panel;
146 - fbdev->dssdev = &omapdss_device;
147 platform_set_drvdata(pdev, fbdev);
148
149 mutex_init(&fbdev->rqueue_mutex);
150 @@ -1830,16 +1816,8 @@
151
152 static int omapfb_probe(struct platform_device *pdev)
153 {
154 - int r;
155 -
156 BUG_ON(fbdev_pdev != NULL);
157
158 - r = platform_device_register(&omapdss_device);
159 - if (r) {
160 - dev_err(&pdev->dev, "can't register omapdss device\n");
161 - return r;
162 - }
163 -
164 /* Delay actual initialization until the LCD is registered */
165 fbdev_pdev = pdev;
166 if (fbdev_panel != NULL)
167 @@ -1867,9 +1845,6 @@
168 fbdev->state = OMAPFB_DISABLED;
169 omapfb_free_resources(fbdev, saved_state);
170
171 - platform_device_unregister(&omapdss_device);
172 - fbdev->dssdev = NULL;
173 -
174 return 0;
175 }
176
177 Index: linux-2.6.37-rc1/drivers/video/omap/rfbi.c
178 ===================================================================
179 --- linux-2.6.37-rc1.orig/drivers/video/omap/rfbi.c 2010-11-01 12:54:12.000000000 +0100
180 +++ linux-2.6.37-rc1/drivers/video/omap/rfbi.c 2010-11-05 17:04:58.563000039 +0100
181 @@ -84,13 +84,13 @@
182
183 static int rfbi_get_clocks(void)
184 {
185 - rfbi.dss_ick = clk_get(&rfbi.fbdev->dssdev->dev, "ick");
186 + rfbi.dss_ick = clk_get(&omapdss_device.dev, "ick");
187 if (IS_ERR(rfbi.dss_ick)) {
188 dev_err(rfbi.fbdev->dev, "can't get ick\n");
189 return PTR_ERR(rfbi.dss_ick);
190 }
191
192 - rfbi.dss1_fck = clk_get(&rfbi.fbdev->dssdev->dev, "dss1_fck");
193 + rfbi.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck");
194 if (IS_ERR(rfbi.dss1_fck)) {
195 dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n");
196 clk_put(rfbi.dss_ick);
This page took 0.051616 seconds and 5 git commands to generate.