aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-04-26 07:48:32 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-09-07 13:01:49 -0400
commitcca35017ca0dadae632ced71a11a7e0b7083af6c (patch)
treebe103d24062e0f3539b909e3381a79903e20d02a /arch
parentc50e86ce7c2961a41f2f7aa6e4fd6c99229ba205 (diff)
OMAPDSS: HDMI: Move GPIO handling to HDMI driver
We currently manage HDMI GPIOs in the board files via platform_enable/disable calls. This won't work with device tree, and in any case the correct place to manage the GPIOs is in the HDMI driver. This patch moves the handling of the GPIOs to the HDMI driver. The GPIO handling is moved to the common hdmi.c file, and this probably needs to be revisited when adding OMAP5 HDMI support to see if the GPIO handling needs to be moved to IP specific files. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c27
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c27
2 files changed, 4 insertions, 50 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index ad8a7d94afcd..2c151c28cca1 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -601,29 +601,6 @@ static void __init omap_sfh7741prox_init(void)
601 __func__, OMAP4_SFH7741_ENABLE_GPIO, error); 601 __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
602} 602}
603 603
604static struct gpio sdp4430_hdmi_gpios[] = {
605 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
606 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
607 { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" },
608};
609
610static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev)
611{
612 int status;
613
614 status = gpio_request_array(sdp4430_hdmi_gpios,
615 ARRAY_SIZE(sdp4430_hdmi_gpios));
616 if (status)
617 pr_err("%s: Cannot request HDMI GPIOs\n", __func__);
618
619 return status;
620}
621
622static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
623{
624 gpio_free_array(sdp4430_hdmi_gpios, ARRAY_SIZE(sdp4430_hdmi_gpios));
625}
626
627static struct nokia_dsi_panel_data dsi1_panel = { 604static struct nokia_dsi_panel_data dsi1_panel = {
628 .name = "taal", 605 .name = "taal",
629 .reset_gpio = 102, 606 .reset_gpio = 102,
@@ -718,6 +695,8 @@ static struct omap_dss_device sdp4430_lcd2_device = {
718}; 695};
719 696
720static struct omap_dss_hdmi_data sdp4430_hdmi_data = { 697static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
698 .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
699 .ls_oe_gpio = HDMI_GPIO_LS_OE,
721 .hpd_gpio = HDMI_GPIO_HPD, 700 .hpd_gpio = HDMI_GPIO_HPD,
722}; 701};
723 702
@@ -725,8 +704,6 @@ static struct omap_dss_device sdp4430_hdmi_device = {
725 .name = "hdmi", 704 .name = "hdmi",
726 .driver_name = "hdmi_panel", 705 .driver_name = "hdmi_panel",
727 .type = OMAP_DISPLAY_TYPE_HDMI, 706 .type = OMAP_DISPLAY_TYPE_HDMI,
728 .platform_enable = sdp4430_panel_enable_hdmi,
729 .platform_disable = sdp4430_panel_disable_hdmi,
730 .channel = OMAP_DSS_CHANNEL_DIGIT, 707 .channel = OMAP_DSS_CHANNEL_DIGIT,
731 .data = &sdp4430_hdmi_data, 708 .data = &sdp4430_hdmi_data,
732}; 709};
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 70f6d1d25463..cd4852e5ca57 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -408,30 +408,9 @@ static struct omap_dss_device omap4_panda_dvi_device = {
408 .channel = OMAP_DSS_CHANNEL_LCD2, 408 .channel = OMAP_DSS_CHANNEL_LCD2,
409}; 409};
410 410
411static struct gpio panda_hdmi_gpios[] = {
412 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
413 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
414 { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" },
415};
416
417static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev)
418{
419 int status;
420
421 status = gpio_request_array(panda_hdmi_gpios,
422 ARRAY_SIZE(panda_hdmi_gpios));
423 if (status)
424 pr_err("Cannot request HDMI GPIOs\n");
425
426 return status;
427}
428
429static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev)
430{
431 gpio_free_array(panda_hdmi_gpios, ARRAY_SIZE(panda_hdmi_gpios));
432}
433
434static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { 411static struct omap_dss_hdmi_data omap4_panda_hdmi_data = {
412 .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
413 .ls_oe_gpio = HDMI_GPIO_LS_OE,
435 .hpd_gpio = HDMI_GPIO_HPD, 414 .hpd_gpio = HDMI_GPIO_HPD,
436}; 415};
437 416
@@ -439,8 +418,6 @@ static struct omap_dss_device omap4_panda_hdmi_device = {
439 .name = "hdmi", 418 .name = "hdmi",
440 .driver_name = "hdmi_panel", 419 .driver_name = "hdmi_panel",
441 .type = OMAP_DISPLAY_TYPE_HDMI, 420 .type = OMAP_DISPLAY_TYPE_HDMI,
442 .platform_enable = omap4_panda_panel_enable_hdmi,
443 .platform_disable = omap4_panda_panel_disable_hdmi,
444 .channel = OMAP_DSS_CHANNEL_DIGIT, 421 .channel = OMAP_DSS_CHANNEL_DIGIT,
445 .data = &omap4_panda_hdmi_data, 422 .data = &omap4_panda_hdmi_data,
446}; 423};