diff options
| -rw-r--r-- | drivers/video/omap2/dss/core.c | 18 | ||||
| -rw-r--r-- | drivers/video/omap2/dss/dpi.c | 23 | ||||
| -rw-r--r-- | drivers/video/omap2/dss/dss.c | 20 | ||||
| -rw-r--r-- | drivers/video/omap2/dss/dss.h | 26 | ||||
| -rw-r--r-- | drivers/video/omap2/dss/sdi.c | 25 |
5 files changed, 71 insertions, 41 deletions
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index db45e6abe311..77fbd99295dc 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c | |||
| @@ -536,6 +536,18 @@ static int __init omap_dss_register_drivers(void) | |||
| 536 | goto err_dispc; | 536 | goto err_dispc; |
| 537 | } | 537 | } |
| 538 | 538 | ||
| 539 | r = dpi_init_platform_driver(); | ||
| 540 | if (r) { | ||
| 541 | DSSERR("Failed to initialize dpi platform driver\n"); | ||
| 542 | goto err_dpi; | ||
| 543 | } | ||
| 544 | |||
| 545 | r = sdi_init_platform_driver(); | ||
| 546 | if (r) { | ||
| 547 | DSSERR("Failed to initialize sdi platform driver\n"); | ||
| 548 | goto err_sdi; | ||
| 549 | } | ||
| 550 | |||
| 539 | r = rfbi_init_platform_driver(); | 551 | r = rfbi_init_platform_driver(); |
| 540 | if (r) { | 552 | if (r) { |
| 541 | DSSERR("Failed to initialize rfbi platform driver\n"); | 553 | DSSERR("Failed to initialize rfbi platform driver\n"); |
| @@ -569,6 +581,10 @@ err_dsi: | |||
| 569 | err_venc: | 581 | err_venc: |
| 570 | rfbi_uninit_platform_driver(); | 582 | rfbi_uninit_platform_driver(); |
| 571 | err_rfbi: | 583 | err_rfbi: |
| 584 | sdi_uninit_platform_driver(); | ||
| 585 | err_sdi: | ||
| 586 | dpi_uninit_platform_driver(); | ||
| 587 | err_dpi: | ||
| 572 | dispc_uninit_platform_driver(); | 588 | dispc_uninit_platform_driver(); |
| 573 | err_dispc: | 589 | err_dispc: |
| 574 | dss_uninit_platform_driver(); | 590 | dss_uninit_platform_driver(); |
| @@ -584,6 +600,8 @@ static void __exit omap_dss_unregister_drivers(void) | |||
| 584 | dsi_uninit_platform_driver(); | 600 | dsi_uninit_platform_driver(); |
| 585 | venc_uninit_platform_driver(); | 601 | venc_uninit_platform_driver(); |
| 586 | rfbi_uninit_platform_driver(); | 602 | rfbi_uninit_platform_driver(); |
| 603 | sdi_uninit_platform_driver(); | ||
| 604 | dpi_uninit_platform_driver(); | ||
| 587 | dispc_uninit_platform_driver(); | 605 | dispc_uninit_platform_driver(); |
| 588 | dss_uninit_platform_driver(); | 606 | dss_uninit_platform_driver(); |
| 589 | 607 | ||
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index d6e8fe776152..79d242a42607 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c | |||
| @@ -379,12 +379,31 @@ int dpi_init_display(struct omap_dss_device *dssdev) | |||
| 379 | return 0; | 379 | return 0; |
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | int dpi_init(void) | 382 | static int omap_dpi_probe(struct platform_device *pdev) |
| 383 | { | 383 | { |
| 384 | return 0; | 384 | return 0; |
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | void dpi_exit(void) | 387 | static int omap_dpi_remove(struct platform_device *pdev) |
| 388 | { | 388 | { |
| 389 | return 0; | ||
| 389 | } | 390 | } |
| 390 | 391 | ||
| 392 | static struct platform_driver omap_dpi_driver = { | ||
| 393 | .probe = omap_dpi_probe, | ||
| 394 | .remove = omap_dpi_remove, | ||
| 395 | .driver = { | ||
| 396 | .name = "omapdss_dpi", | ||
| 397 | .owner = THIS_MODULE, | ||
| 398 | }, | ||
| 399 | }; | ||
| 400 | |||
| 401 | int dpi_init_platform_driver(void) | ||
| 402 | { | ||
| 403 | return platform_driver_register(&omap_dpi_driver); | ||
| 404 | } | ||
| 405 | |||
| 406 | void dpi_uninit_platform_driver(void) | ||
| 407 | { | ||
| 408 | platform_driver_unregister(&omap_dpi_driver); | ||
| 409 | } | ||
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index c849d8bd5256..7a7ddd8fbf5e 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
| @@ -786,18 +786,6 @@ static int omap_dsshw_probe(struct platform_device *pdev) | |||
| 786 | dss.lcd_clk_source[0] = OMAP_DSS_CLK_SRC_FCK; | 786 | dss.lcd_clk_source[0] = OMAP_DSS_CLK_SRC_FCK; |
| 787 | dss.lcd_clk_source[1] = OMAP_DSS_CLK_SRC_FCK; | 787 | dss.lcd_clk_source[1] = OMAP_DSS_CLK_SRC_FCK; |
| 788 | 788 | ||
| 789 | r = dpi_init(); | ||
| 790 | if (r) { | ||
| 791 | DSSERR("Failed to initialize DPI\n"); | ||
| 792 | goto err_dpi; | ||
| 793 | } | ||
| 794 | |||
| 795 | r = sdi_init(); | ||
| 796 | if (r) { | ||
| 797 | DSSERR("Failed to initialize SDI\n"); | ||
| 798 | goto err_sdi; | ||
| 799 | } | ||
| 800 | |||
| 801 | rev = dss_read_reg(DSS_REVISION); | 789 | rev = dss_read_reg(DSS_REVISION); |
| 802 | printk(KERN_INFO "OMAP DSS rev %d.%d\n", | 790 | printk(KERN_INFO "OMAP DSS rev %d.%d\n", |
| 803 | FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0)); | 791 | FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0)); |
| @@ -805,10 +793,7 @@ static int omap_dsshw_probe(struct platform_device *pdev) | |||
| 805 | dss_runtime_put(); | 793 | dss_runtime_put(); |
| 806 | 794 | ||
| 807 | return 0; | 795 | return 0; |
| 808 | err_sdi: | 796 | |
| 809 | dpi_exit(); | ||
| 810 | err_dpi: | ||
| 811 | dss_runtime_put(); | ||
| 812 | err_runtime_get: | 797 | err_runtime_get: |
| 813 | pm_runtime_disable(&pdev->dev); | 798 | pm_runtime_disable(&pdev->dev); |
| 814 | dss_put_clocks(); | 799 | dss_put_clocks(); |
| @@ -817,9 +802,6 @@ err_runtime_get: | |||
| 817 | 802 | ||
| 818 | static int omap_dsshw_remove(struct platform_device *pdev) | 803 | static int omap_dsshw_remove(struct platform_device *pdev) |
| 819 | { | 804 | { |
| 820 | dpi_exit(); | ||
| 821 | sdi_exit(); | ||
| 822 | |||
| 823 | pm_runtime_disable(&pdev->dev); | 805 | pm_runtime_disable(&pdev->dev); |
| 824 | 806 | ||
| 825 | dss_put_clocks(); | 807 | dss_put_clocks(); |
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 848fc9cd65d4..5496134c280b 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h | |||
| @@ -272,17 +272,12 @@ int dss_calc_clock_div(bool is_tft, unsigned long req_pck, | |||
| 272 | 272 | ||
| 273 | /* SDI */ | 273 | /* SDI */ |
| 274 | #ifdef CONFIG_OMAP2_DSS_SDI | 274 | #ifdef CONFIG_OMAP2_DSS_SDI |
| 275 | int sdi_init(void); | 275 | int sdi_init_platform_driver(void); |
| 276 | void sdi_exit(void); | 276 | void sdi_uninit_platform_driver(void); |
| 277 | int sdi_init_display(struct omap_dss_device *display); | 277 | int sdi_init_display(struct omap_dss_device *display); |
| 278 | #else | 278 | #else |
| 279 | static inline int sdi_init(void) | 279 | static inline int sdi_init_platform_driver(void) { return 0; } |
| 280 | { | 280 | static inline void sdi_uninit_platform_driver(void) { } |
| 281 | return 0; | ||
| 282 | } | ||
| 283 | static inline void sdi_exit(void) | ||
| 284 | { | ||
| 285 | } | ||
| 286 | #endif | 281 | #endif |
| 287 | 282 | ||
| 288 | /* DSI */ | 283 | /* DSI */ |
| @@ -384,17 +379,12 @@ static inline struct platform_device *dsi_get_dsidev_from_id(int module) | |||
| 384 | 379 | ||
| 385 | /* DPI */ | 380 | /* DPI */ |
| 386 | #ifdef CONFIG_OMAP2_DSS_DPI | 381 | #ifdef CONFIG_OMAP2_DSS_DPI |
| 387 | int dpi_init(void); | 382 | int dpi_init_platform_driver(void); |
| 388 | void dpi_exit(void); | 383 | void dpi_uninit_platform_driver(void); |
| 389 | int dpi_init_display(struct omap_dss_device *dssdev); | 384 | int dpi_init_display(struct omap_dss_device *dssdev); |
| 390 | #else | 385 | #else |
| 391 | static inline int dpi_init(void) | 386 | static inline int dpi_init_platform_driver(void) { return 0; } |
| 392 | { | 387 | static inline void dpi_uninit_platform_driver(void) { } |
| 393 | return 0; | ||
| 394 | } | ||
| 395 | static inline void dpi_exit(void) | ||
| 396 | { | ||
| 397 | } | ||
| 398 | #endif | 388 | #endif |
| 399 | 389 | ||
| 400 | /* DISPC */ | 390 | /* DISPC */ |
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 67fbe7cee412..4ae2d8f55048 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/err.h> | 24 | #include <linux/err.h> |
| 25 | #include <linux/regulator/consumer.h> | 25 | #include <linux/regulator/consumer.h> |
| 26 | #include <linux/export.h> | 26 | #include <linux/export.h> |
| 27 | #include <linux/platform_device.h> | ||
| 27 | 28 | ||
| 28 | #include <video/omapdss.h> | 29 | #include <video/omapdss.h> |
| 29 | #include "dss.h" | 30 | #include "dss.h" |
| @@ -182,11 +183,31 @@ int sdi_init_display(struct omap_dss_device *dssdev) | |||
| 182 | return 0; | 183 | return 0; |
| 183 | } | 184 | } |
| 184 | 185 | ||
| 185 | int sdi_init(void) | 186 | static int omap_sdi_probe(struct platform_device *pdev) |
| 186 | { | ||
