diff options
| author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-05-15 03:40:15 -0400 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-08-29 09:21:52 -0400 |
| commit | 86a3efe150af25e7ca495d4ea46c6aa69c3d462a (patch) | |
| tree | ccf0b2daadc60ac591462cd842bf393105a5a5a0 | |
| parent | 05cefbe2f22e551594c5ec618102a35317bd050d (diff) | |
OMAPDSS: DPI: 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 DPI driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
| -rw-r--r-- | drivers/video/omap2/dss/dpi.c | 107 | ||||
| -rw-r--r-- | include/video/omapdss.h | 8 |
2 files changed, 9 insertions, 106 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 89c7a6e7b185..b268d0460038 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c | |||
| @@ -345,7 +345,7 @@ static void dpi_config_lcd_manager(struct omap_overlay_manager *mgr) | |||
| 345 | dss_mgr_set_lcd_config(mgr, &dpi.mgr_config); | 345 | dss_mgr_set_lcd_config(mgr, &dpi.mgr_config); |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) | 348 | static int dpi_display_enable(struct omap_dss_device *dssdev) |
| 349 | { | 349 | { |
| 350 | struct omap_dss_device *out = &dpi.output; | 350 | struct omap_dss_device *out = &dpi.output; |
| 351 | int r; | 351 | int r; |
| @@ -423,9 +423,8 @@ err_no_reg: | |||
| 423 | mutex_unlock(&dpi.lock); | 423 | mutex_unlock(&dpi.lock); |
| 424 | return r; | 424 | return r; |
| 425 | } | 425 | } |
| 426 | EXPORT_SYMBOL(omapdss_dpi_display_enable); | ||
| 427 | 426 | ||
| 428 | void omapdss_dpi_display_disable(struct omap_dss_device *dssdev) | 427 | static void dpi_display_disable(struct omap_dss_device *dssdev) |
| 429 | { | 428 | { |
| 430 | struct omap_overlay_manager *mgr = dpi.output.manager; | 429 | struct omap_overlay_manager *mgr = dpi.output.manager; |
| 431 | 430 | ||
| @@ -446,9 +445,8 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev) | |||
| 446 | 445 | ||
| 447 | mutex_unlock(&dpi.lock); | 446 | mutex_unlock(&dpi.lock); |
| 448 | } | 447 | } |
| 449 | EXPORT_SYMBOL(omapdss_dpi_display_disable); | ||
| 450 | 448 | ||
| 451 | void omapdss_dpi_set_timings(struct omap_dss_device *dssdev, | 449 | static void dpi_set_timings(struct omap_dss_device *dssdev, |
| 452 | struct omap_video_timings *timings) | 450 | struct omap_video_timings *timings) |
| 453 | { | 451 | { |
| 454 | DSSDBG("dpi_set_timings\n"); | 452 | DSSDBG("dpi_set_timings\n"); |
| @@ -459,7 +457,6 @@ void omapdss_dpi_set_timings(struct omap_dss_device *dssdev, | |||
| 459 | 457 | ||
| 460 | mutex_unlock(&dpi.lock); | 458 | mutex_unlock(&dpi.lock); |
| 461 | } | 459 | } |
| 462 | EXPORT_SYMBOL(omapdss_dpi_set_timings); | ||
| 463 | 460 | ||
| 464 | static void dpi_get_timings(struct omap_dss_device *dssdev, | 461 | static void dpi_get_timings(struct omap_dss_device *dssdev, |
| 465 | struct omap_video_timings *timings) | 462 | struct omap_video_timings *timings) |
| @@ -471,7 +468,7 @@ static void dpi_get_timings(struct omap_dss_device *dssdev, | |||
| 471 | mutex_unlock(&dpi.lock); | 468 | mutex_unlock(&dpi.lock); |
| 472 | } | 469 | } |
| 473 | 470 | ||
| 474 | int dpi_check_timings(struct omap_dss_device *dssdev, | 471 | static int dpi_check_timings(struct omap_dss_device *dssdev, |
| 475 | struct omap_video_timings *timings) | 472 | struct omap_video_timings *timings) |
| 476 | { | 473 | { |
| 477 | struct omap_overlay_manager *mgr = dpi.output.manager; | 474 | struct omap_overlay_manager *mgr = dpi.output.manager; |
| @@ -510,9 +507,8 @@ int dpi_check_timings(struct omap_dss_device *dssdev, | |||
| 510 | 507 | ||
| 511 | return 0; | 508 | return 0; |
| 512 | } | 509 | } |
| 513 | EXPORT_SYMBOL(dpi_check_timings); | ||
| 514 | 510 | ||
| 515 | void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) | 511 | static void dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) |
| 516 | { | 512 | { |
| 517 | mutex_lock(&dpi.lock); | 513 | mutex_lock(&dpi.lock); |
| 518 | 514 | ||
| @@ -520,7 +516,6 @@ void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) | |||
| 520 | 516 | ||
| 521 | mutex_unlock(&dpi.lock); | 517 | mutex_unlock(&dpi.lock); |
| 522 | } | 518 | } |
| 523 | EXPORT_SYMBOL(omapdss_dpi_set_data_lines); | ||
| 524 | 519 | ||
| 525 | static int dpi_verify_dsi_pll(struct platform_device *dsidev) | 520 | static int dpi_verify_dsi_pll(struct platform_device *dsidev) |
| 526 | { | 521 | { |
| @@ -614,76 +609,6 @@ static enum omap_channel dpi_get_channel(void) | |||
| 614 | } | 609 | } |
| 615 | } | 610 | } |
| 616 | 611 | ||
| 617 | static struct omap_dss_device *dpi_find_dssdev(struct platform_device *pdev) | ||
| 618 | { | ||
| 619 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; | ||
| 620 | const char *def_disp_name = omapdss_get_default_display_name(); | ||
| 621 | struct omap_dss_device *def_dssdev; | ||
| 622 | int i; | ||
| 623 | |||
| 624 | def_dssdev = NULL; | ||
| 625 | |||
| 626 | for (i = 0; i < pdata->num_devices; ++i) { | ||
| 627 | struct omap_dss_device *dssdev = pdata->devices[i]; | ||
| 628 | |||
| 629 | if (dssdev->type != OMAP_DISPLAY_TYPE_DPI) | ||
| 630 | continue; | ||
| 631 | |||
| 632 | if (def_dssdev == NULL) | ||
| 633 | def_dssdev = dssdev; | ||
| 634 | |||
| 635 | if (def_disp_name != NULL && | ||
| 636 | strcmp(dssdev->name, def_disp_name) == 0) { | ||
| 637 | def_dssdev = dssdev; | ||
| 638 | break; | ||
| 639 | } | ||
| 640 | } | ||
| 641 | |||
| 642 | return def_dssdev; | ||
| 643 | } | ||
| 644 | |||
| 645 | static int dpi_probe_pdata(struct platform_device *dpidev) | ||
| 646 | { | ||
| 647 | struct omap_dss_device *plat_dssdev; | ||
| 648 | struct omap_dss_device *dssdev; | ||
| 649 | int r; | ||
| 650 | |||
| 651 | plat_dssdev = dpi_find_dssdev(dpidev); | ||
| 652 | |||
| 653 | if (!plat_dssdev) | ||
| 654 | return 0; | ||
| 655 | |||
| 656 | r = dpi_init_regulator(); | ||
| 657 | if (r) | ||
| 658 | return r; | ||
| 659 | |||
| 660 | dpi_init_pll(); | ||
| 661 | |||
| 662 | dssdev = dss_alloc_and_init_device(&dpidev->dev); | ||
| 663 | if (!dssdev) | ||
| 664 | return -ENOMEM; | ||
| 665 | |||
| 666 | dss_copy_device_pdata(dssdev, plat_dssdev); | ||
| 667 | |||
| 668 | r = omapdss_output_set_device(&dpi.output, dssdev); | ||
| 669 | if (r) { | ||
| 670 | DSSERR("failed to connect output to new device: %s\n", | ||
| 671 | dssdev->name); | ||
| 672 | dss_put_device(dssdev); | ||
| 673 | return r; | ||
| 674 | } | ||
| 675 | |||
| 676 | r = dss_add_device(dssdev); | ||
| 677 | if (r) { | ||
| 678 | DSSERR("device %s register failed: %d\n", dssdev->name, r); | ||
| 679 | omapdss_output_unset_device(&dpi.output); | ||
| 680 | dss_put_device(dssdev); | ||
| 681 | return r; | ||
| 682 | } | ||
| 683 | |||
| 684 | return 0; | ||
| 685 | } | ||
| 686 | |||
| 687 | static int dpi_connect(struct omap_dss_device *dssdev, | 612 | static int dpi_connect(struct omap_dss_device *dssdev, |
| 688 | struct omap_dss_device *dst) | 613 | struct omap_dss_device *dst) |
| 689 | { | 614 | { |
| @@ -733,14 +658,14 @@ static const struct omapdss_dpi_ops dpi_ops = { | |||
| 733 | .connect = dpi_connect, | 658 | .connect = dpi_connect, |
| 734 | .disconnect = dpi_disconnect, | 659 | .disconnect = dpi_disconnect, |
| 735 | 660 | ||
| 736 | .enable = omapdss_dpi_display_enable, | 661 | .enable = dpi_display_enable, |
| 737 | .disable = omapdss_dpi_display_disable, | 662 | .disable = dpi_display_disable, |
| 738 | 663 | ||
| 739 | .check_timings = dpi_check_timings, | 664 | .check_timings = dpi_check_timings, |
| 740 | .set_timings = omapdss_dpi_set_timings, | 665 | .set_timings = dpi_set_timings, |
| 741 | .get_timings = dpi_get_timings, | 666 | .get_timings = dpi_get_timings, |
| 742 | 667 | ||
| 743 | .set_data_lines = omapdss_dpi_set_data_lines, | 668 | .set_data_lines = dpi_set_data_lines, |
| 744 | }; | 669 | }; |
| 745 | 670 | ||
| 746 | static void dpi_init_output(struct platform_device *pdev) | 671 | static void dpi_init_output(struct platform_device *pdev) |
| @@ -767,31 +692,17 @@ static void __exit dpi_uninit_output(struct platform_device *pdev) | |||
| 767 | 692 | ||
| 768 | static int omap_dpi_probe(struct platform_device *pdev) | 693 | static int omap_dpi_probe(struct platform_device *pdev) |
| 769 | { | 694 | { |
| 770 | int r; | ||
| 771 | |||
| 772 | dpi.pdev = pdev; | 695 | dpi.pdev = pdev; |
| 773 | 696 | ||
| 774 | mutex_init(&dpi.lock); | 697 | mutex_init(&dpi.lock); |
| 775 | 698 | ||
| 776 | dpi_init_output(pdev); | 699 | dpi_init_output(pdev); |
| 777 | 700 | ||
| 778 | if (pdev->dev.platform_data) { | ||
| 779 | r = dpi_probe_pdata(pdev); | ||
| 780 | if (r) | ||
| 781 | goto err_probe; | ||
| 782 | } | ||
| 783 | |||
| 784 | return 0; | 701 | return 0; |
| 785 | |||
| 786 | err_probe: | ||
| 787 | dpi_uninit_output(pdev); | ||
| 788 | return r; | ||
| 789 | } | 702 | } |
| 790 | 703 | ||
| 791 | static int __exit omap_dpi_remove(struct platform_device *pdev) | 704 | static int __exit omap_dpi_remove(struct platform_device *pdev) |
| 792 | { | 705 | { |
| 793 | dss_unregister_child_devices(&pdev->dev); | ||
| 794 | |||
| 795 | dpi_uninit_output(pdev); | 706 | dpi_uninit_output(pdev); |
| 796 | 707 | ||
| 797 | return 0; | 708 | return 0; |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 3b68dc2c6410..1199e3beb7be 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
| @@ -1038,14 +1038,6 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); | |||
| 1038 | void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, | 1038 | void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, |
| 1039 | bool disconnect_lanes, bool enter_ulps); | 1039 | bool disconnect_lanes, bool enter_ulps); |
| 1040 | 1040 | ||
| 1041 | int omapdss_dpi_display_enable(struct omap_dss_device *dssdev); | ||
| 1042 | void omapdss_dpi_display_disable(struct omap_dss_device *dssdev); | ||
| 1043 | void omapdss_dpi_set_timings(struct omap_dss_device *dssdev, | ||
| 1044 | struct omap_video_timings *timings); | ||
| 1045 | int dpi_check_timings(struct omap_dss_device *dssdev, | ||
| 1046 | struct omap_video_timings *timings); | ||
| 1047 | void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines); | ||
| 1048 | |||
| 1049 | int omapdss_sdi_display_enable(struct omap_dss_device *dssdev); | 1041 | int omapdss_sdi_display_enable(struct omap_dss_device *dssdev); |
| 1050 | void omapdss_sdi_display_disable(struct omap_dss_device *dssdev); | 1042 | void omapdss_sdi_display_disable(struct omap_dss_device *dssdev); |
| 1051 | void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, | 1043 | void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, |
