diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-05-22 06:14:37 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-08-29 09:21:53 -0400 |
commit | cd6e915b360c26a71aaa634ef6735658b05fe89d (patch) | |
tree | d7de3a9dd02f48d8079fc8673de41828cbf45a68 /drivers/video | |
parent | 5cfc1c3cb6f0a5875ea18cc8ea6e0ac4bdde6b95 (diff) |
OMAPDSS: SDI: remove code related to old panel model
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.
This patch removes the code from the SDI driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/dss/sdi.c | 105 |
1 files changed, 8 insertions, 97 deletions
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 82b64e3fbd08..b3276889b58a 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c | |||
@@ -124,7 +124,7 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) | |||
124 | dss_mgr_set_lcd_config(mgr, &sdi.mgr_config); | 124 | dss_mgr_set_lcd_config(mgr, &sdi.mgr_config); |
125 | } | 125 | } |
126 | 126 | ||
127 | int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) | 127 | static int sdi_display_enable(struct omap_dss_device *dssdev) |
128 | { | 128 | { |
129 | struct omap_dss_device *out = &sdi.output; | 129 | struct omap_dss_device *out = &sdi.output; |
130 | struct omap_video_timings *t = &sdi.timings; | 130 | struct omap_video_timings *t = &sdi.timings; |
@@ -211,9 +211,8 @@ err_get_dispc: | |||
211 | err_reg_enable: | 211 | err_reg_enable: |
212 | return r; | 212 | return r; |
213 | } | 213 | } |
214 | EXPORT_SYMBOL(omapdss_sdi_display_enable); | ||
215 | 214 | ||
216 | void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) | 215 | static void sdi_display_disable(struct omap_dss_device *dssdev) |
217 | { | 216 | { |
218 | struct omap_overlay_manager *mgr = sdi.output.manager; | 217 | struct omap_overlay_manager *mgr = sdi.output.manager; |
219 | 218 | ||
@@ -225,14 +224,12 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) | |||
225 | 224 | ||
226 | regulator_disable(sdi.vdds_sdi_reg); | 225 | regulator_disable(sdi.vdds_sdi_reg); |
227 | } | 226 | } |
228 | EXPORT_SYMBOL(omapdss_sdi_display_disable); | ||
229 | 227 | ||
230 | void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, | 228 | static void sdi_set_timings(struct omap_dss_device *dssdev, |
231 | struct omap_video_timings *timings) | 229 | struct omap_video_timings *timings) |
232 | { | 230 | { |
233 | sdi.timings = *timings; | 231 | sdi.timings = *timings; |
234 | } | 232 | } |
235 | EXPORT_SYMBOL(omapdss_sdi_set_timings); | ||
236 | 233 | ||
237 | static void sdi_get_timings(struct omap_dss_device *dssdev, | 234 | static void sdi_get_timings(struct omap_dss_device *dssdev, |
238 | struct omap_video_timings *timings) | 235 | struct omap_video_timings *timings) |
@@ -254,11 +251,10 @@ static int sdi_check_timings(struct omap_dss_device *dssdev, | |||
254 | return 0; | 251 | return 0; |
255 | } | 252 | } |
256 | 253 | ||
257 | void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs) | 254 | static void sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs) |
258 | { | 255 | { |
259 | sdi.datapairs = datapairs; | 256 | sdi.datapairs = datapairs; |
260 | } | 257 | } |
261 | EXPORT_SYMBOL(omapdss_sdi_set_datapairs); | ||
262 | 258 | ||
263 | static int sdi_init_regulator(void) | 259 | static int sdi_init_regulator(void) |
264 | { | 260 | { |
@@ -278,77 +274,6 @@ static int sdi_init_regulator(void) | |||
278 | return 0; | 274 | return 0; |
279 | } | 275 | } |
280 | 276 | ||
281 | static struct omap_dss_device *sdi_find_dssdev(struct platform_device *pdev) | ||
282 | { | ||
283 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; | ||
284 | const char *def_disp_name = omapdss_get_default_display_name(); | ||
285 | struct omap_dss_device *def_dssdev; | ||
286 | int i; | ||
287 | |||
288 | def_dssdev = NULL; | ||
289 | |||
290 | for (i = 0; i < pdata->num_devices; ++i) { | ||
291 | struct omap_dss_device *dssdev = pdata->devices[i]; | ||
292 | |||
293 | if (dssdev->type != OMAP_DISPLAY_TYPE_SDI) | ||
294 | continue; | ||
295 | |||
296 | if (def_dssdev == NULL) | ||
297 | def_dssdev = dssdev; | ||
298 | |||
299 | if (def_disp_name != NULL && | ||
300 | strcmp(dssdev->name, def_disp_name) == 0) { | ||
301 | def_dssdev = dssdev; | ||
302 | break; | ||
303 | } | ||
304 | } | ||
305 | |||
306 | return def_dssdev; | ||
307 | } | ||
308 | |||
309 | static int sdi_probe_pdata(struct platform_device *sdidev) | ||
310 | { | ||
311 | struct omap_dss_device *plat_dssdev; | ||
312 | struct omap_dss_device *dssdev; | ||
313 | int r; | ||
314 | |||
315 | plat_dssdev = sdi_find_dssdev(sdidev); | ||
316 | |||
317 | if (!plat_dssdev) | ||
318 | return 0; | ||
319 | |||
320 | dssdev = dss_alloc_and_init_device(&sdidev->dev); | ||
321 | if (!dssdev) | ||
322 | return -ENOMEM; | ||
323 | |||
324 | dss_copy_device_pdata(dssdev, plat_dssdev); | ||
325 | |||
326 | r = sdi_init_regulator(); | ||
327 | if (r) { | ||
328 | DSSERR("device %s init failed: %d\n", dssdev->name, r); | ||
329 | dss_put_device(dssdev); | ||
330 | return r; | ||
331 | } | ||
332 | |||
333 | r = omapdss_output_set_device(&sdi.output, dssdev); | ||
334 | if (r) { | ||
335 | DSSERR("failed to connect output to new device: %s\n", | ||
336 | dssdev->name); | ||
337 | dss_put_device(dssdev); | ||
338 | return r; | ||
339 | } | ||
340 | |||
341 | r = dss_add_device(dssdev); | ||
342 | if (r) { | ||
343 | DSSERR("device %s register failed: %d\n", dssdev->name, r); | ||
344 | omapdss_output_unset_device(&sdi.output); | ||
345 | dss_put_device(dssdev); | ||
346 | return r; | ||
347 | } | ||
348 | |||
349 | return 0; | ||
350 | } | ||
351 | |||
352 | static int sdi_connect(struct omap_dss_device *dssdev, | 277 | static int sdi_connect(struct omap_dss_device *dssdev, |
353 | struct omap_dss_device *dst) | 278 | struct omap_dss_device *dst) |
354 | { | 279 | { |
@@ -396,14 +321,14 @@ static const struct omapdss_sdi_ops sdi_ops = { | |||
396 | .connect = sdi_connect, | 321 | .connect = sdi_connect, |
397 | .disconnect = sdi_disconnect, | 322 | .disconnect = sdi_disconnect, |
398 | 323 | ||
399 | .enable = omapdss_sdi_display_enable, | 324 | .enable = sdi_display_enable, |
400 | .disable = omapdss_sdi_display_disable, | 325 | .disable = sdi_display_disable, |
401 | 326 | ||
402 | .check_timings = sdi_check_timings, | 327 | .check_timings = sdi_check_timings, |
403 | .set_timings = omapdss_sdi_set_timings, | 328 | .set_timings = sdi_set_timings, |
404 | .get_timings = sdi_get_timings, | 329 | .get_timings = sdi_get_timings, |
405 | 330 | ||
406 | .set_datapairs = omapdss_sdi_set_datapairs, | 331 | .set_datapairs = sdi_set_datapairs, |
407 | }; | 332 | }; |
408 | 333 | ||
409 | static void sdi_init_output(struct platform_device *pdev) | 334 | static void sdi_init_output(struct platform_device *pdev) |
@@ -430,29 +355,15 @@ static void __exit sdi_uninit_output(struct platform_device *pdev) | |||
430 | 355 | ||
431 | static int omap_sdi_probe(struct platform_device *pdev) | 356 | static int omap_sdi_probe(struct platform_device *pdev) |
432 | { | 357 | { |
433 | int r; | ||
434 | |||
435 | sdi.pdev = pdev; | 358 | sdi.pdev = pdev; |
436 | 359 | ||
437 | sdi_init_output(pdev); | 360 | sdi_init_output(pdev); |
438 | 361 | ||
439 | if (pdev->dev.platform_data) { | ||
440 | r = sdi_probe_pdata(pdev); | ||
441 | if (r) | ||
442 | goto err_probe; | ||
443 | } | ||
444 | |||
445 | return 0; | 362 | return 0; |
446 | |||
447 | err_probe: | ||
448 | sdi_uninit_output(pdev); | ||
449 | return r; | ||
450 | } | 363 | } |
451 | 364 | ||
452 | static int __exit omap_sdi_remove(struct platform_device *pdev) | 365 | static int __exit omap_sdi_remove(struct platform_device *pdev) |
453 | { | 366 | { |
454 | dss_unregister_child_devices(&pdev->dev); | ||
455 | |||
456 | sdi_uninit_output(pdev); | 367 | sdi_uninit_output(pdev); |
457 | 368 | ||
458 | return 0; | 369 | return 0; |