diff options
author | Olof Johansson <olof@lixom.net> | 2012-05-10 23:51:21 -0700 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-05-10 23:51:21 -0700 |
commit | d211093fbad99e6c38e168f71ca2ede64a51fe58 (patch) | |
tree | cd08522ca6fefee1f3608f84b4f3419e5af332e1 /arch/arm | |
parent | a9a9bb2062b9202dda0b2a84b44e305669136d1a (diff) | |
parent | 21f787b356279798a002c68d53628755c84168de (diff) | |
download | linux-d211093fbad99e6c38e168f71ca2ede64a51fe58.tar.bz2 |
Merge tag 'omap-cleanup-dss-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
Clean up for omap DSS board init in preparation for adding DT support.
By Tomi Valkeinen
via Tomi Valkeinen (1) and Tony Lindgren (1)
* tag 'omap-cleanup-dss-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
OMAPDSS: DSI: implement generic DSI pin config
OMAPDSS: Taal: move reset gpio handling to taal driver
OMAPDSS: TFP410: rename dvi files to tfp410
OMAPDSS: TFP410: rename dvi -> tfp410
OMAP: board-files: remove custom PD GPIO handling for DVI output
OMAPDSS: panel-dvi: add PD gpio handling
Resolved context conflicts in arch/arm/mach-omap2/board-omap4panda.c.
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 38 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 37 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-am3517evm.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 30 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-devkit8000.c | 30 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-igep0020.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 37 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 29 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3stalker.c | 29 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 40 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 25 |
11 files changed, 52 insertions, 300 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index da75f239873e..37abb0d49b51 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -37,7 +37,7 @@ #include <plat/dma.h> #include <plat/gpmc.h> #include <video/omapdss.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h> #include <plat/gpmc-smc91x.h> @@ -113,9 +113,6 @@ static struct gpio sdp3430_dss_gpios[] __initdata = { {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"}, }; -static int lcd_enabled; -static int dvi_enabled; - static void __init sdp3430_display_init(void) { int r; @@ -129,44 +126,18 @@ static void __init sdp3430_display_init(void) static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev) { - if (dvi_enabled) { - printk(KERN_ERR "cannot enable LCD, DVI is enabled\n"); - return -EINVAL; - } - gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1); gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1); - lcd_enabled = 1; - return 0; } static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev) { - lcd_enabled = 0; - gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0); gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0); } -static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev) -{ - if (lcd_enabled) { - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); - return -EINVAL; - } - - dvi_enabled = 1; - - return 0; -} - -static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev) -{ - dvi_enabled = 0; -} - static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev) { return 0; @@ -186,15 +157,14 @@ static struct omap_dss_device sdp3430_lcd_device = { .platform_disable = sdp3430_panel_disable_lcd, }; -static struct panel_dvi_platform_data dvi_panel = { - .platform_enable = sdp3430_panel_enable_dvi, - .platform_disable = sdp3430_panel_disable_dvi, +static struct tfp410_platform_data dvi_panel = { + .power_down_gpio = -1, }; static struct omap_dss_device sdp3430_dvi_device = { .name = "dvi", .type = OMAP_DISPLAY_TYPE_DPI, - .driver_name = "dvi", + .driver_name = "tfp410", .data = &dvi_panel, .phy.dpi.data_lines = 24, }; diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 130ab00c09a2..b4ad706c145a 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -666,6 +666,10 @@ static struct nokia_dsi_panel_data dsi1_panel = { .use_ext_te = false, .ext_te_gpio = 101, .esd_interval = 0, + .pin_config = { + .num_pins = 6, + .pins = { 0, 1, 2, 3, 4, 5 }, + }, }; static struct omap_dss_device sdp4430_lcd_device = { @@ -674,13 +678,6 @@ static struct omap_dss_device sdp4430_lcd_device = { .type = OMAP_DISPLAY_TYPE_DSI, .data = &dsi1_panel, .phy.dsi = { - .clk_lane = 1, - .clk_pol = 0, - .data1_lane = 2, - .data1_pol = 0, - .data2_lane = 3, - .data2_pol = 0, - .module = 0, }, @@ -715,6 +712,10 @@ static struct nokia_dsi_panel_data dsi2_panel = { .use_ext_te = false, .ext_te_gpio = 103, .esd_interval = 0, + .pin_config = { + .num_pins = 6, + .pins = { 0, 1, 2, 3, 4, 5 }, + }, }; static struct omap_dss_device sdp4430_lcd2_device = { @@ -723,12 +724,6 @@ static struct omap_dss_device sdp4430_lcd2_device = { .type = OMAP_DISPLAY_TYPE_DSI, .data = &dsi2_panel, .phy.dsi = { - .clk_lane = 1, - .clk_pol = 0, - .data1_lane = 2, - .data1_pol = 0, - .data2_lane = 3, - .data2_pol = 0, .module = 1, }, @@ -758,21 +753,6 @@ static struct omap_dss_device sdp4430_lcd2_device = { .channel = OMAP_DSS_CHANNEL_LCD2, }; -static void sdp4430_lcd_init(void) -{ - int r; - - r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT, - "lcd1_reset_gpio"); - if (r) - pr_err("%s: Could not get lcd1_reset_gpio\n", __func__); - - r = gpio_request_one(dsi2_panel.reset_gpio, GPIOF_DIR_OUT, - "lcd2_reset_gpio"); - if (r) - pr_err("%s: Could not get lcd2_reset_gpio\n", __func__); -} - static struct omap_dss_hdmi_data sdp4430_hdmi_data = { .hpd_gpio = HDMI_GPIO_HPD, }; @@ -858,7 +838,6 @@ static void __init omap_4430sdp_display_init(void) if (r) pr_err("%s: Could not get display_sel GPIO\n", __func__); - sdp4430_lcd_init(); sdp4430_picodlp_init(); omap_display_init(&sdp4430_dss_data); /* diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 3645285a3e2b..99790eb646e8 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -37,7 +37,7 @@ #include <plat/usb.h> #include <video/omapdss.h> #include <video/omap-panel-generic-dpi.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h> #include "am35xx-emac.h" #include "mux.h" @@ -207,31 +207,14 @@ static struct omap_dss_device am3517_evm_tv_device = { .platform_disable = am3517_evm_panel_disable_tv, }; -static int am3517_evm_panel_enable_dvi(struct omap_dss_device *dssdev) -{ - if (lcd_enabled) { - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); - return -EINVAL; - } - dvi_enabled = 1; - - return 0; -} - -static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev) -{ - dvi_enabled = 0; -} - -static struct panel_dvi_platform_data dvi_panel = { - .platform_enable = am3517_evm_panel_enable_dvi, - .platform_disable = am3517_evm_panel_disable_dvi, +static struct tfp410_platform_data dvi_panel = { + .power_down_gpio = -1, }; static struct omap_dss_device am3517_evm_dvi_device = { .type = OMAP_DISPLAY_TYPE_DPI, .name = "dvi", - .driver_name = "dvi", + .driver_name = "tfp410", .data = &dvi_panel, .phy.dpi.data_lines = 24, }; diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 909a8b91b564..45746cb56c68 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -44,7 +44,7 @@ #include <plat/usb.h> #include <video/omapdss.h> #include <video/omap-panel-generic-dpi.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h> #include <plat/mcspi.h> #include <mach/hardware.h> @@ -218,25 +218,6 @@ static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev) gpio_set_value(CM_T35_LCD_EN_GPIO, 0); } -static int cm_t35_panel_enable_dvi(struct omap_dss_device *dssdev) -{ - if (lcd_enabled) { - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); - return -EINVAL; - } - - gpio_set_value(CM_T35_DVI_EN_GPIO, 0); - dvi_enabled = 1; - - return 0; -} - -static void cm_t35_panel_disable_dvi(struct omap_dss_device *dssdev) -{ - gpio_set_value(CM_T35_DVI_EN_GPIO, 1); - dvi_enabled = 0; -} - static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev) { return 0; @@ -260,15 +241,14 @@ static struct omap_dss_device cm_t35_lcd_device = { .phy.dpi.data_lines = 18, }; -static struct panel_dvi_platform_data dvi_panel = { - .platform_enable = cm_t35_panel_enable_dvi, - .platform_disable = cm_t35_panel_disable_dvi, +static struct tfp410_platform_data dvi_panel = { + .power_down_gpio = CM_T35_DVI_EN_GPIO, }; static struct omap_dss_device cm_t35_dvi_device = { .name = "dvi", .type = OMAP_DISPLAY_TYPE_DPI, - .driver_name = "dvi", + .driver_name = "tfp410", .data = &dvi_panel, .phy.dpi.data_lines = 24, }; @@ -316,7 +296,6 @@ static struct spi_board_info cm_t35_lcd_spi_board_info[] __initdata = { static struct gpio cm_t35_dss_gpios[] __initdata = { { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" }, { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" }, - { CM_T35_DVI_EN_GPIO, GPIOF_OUT_INIT_HIGH, "dvi enable" }, }; static void __init cm_t35_init_display(void) @@ -335,7 +314,6 @@ static void __init cm_t35_init_display(void) gpio_export(CM_T35_LCD_EN_GPIO, 0); gpio_export(CM_T35_LCD_BL_GPIO, 0); - gpio_export(CM_T35_DVI_EN_GPIO, 0); msleep(50); gpio_set_value(CM_T35_LCD_EN_GPIO, 1); diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index a2010f07de31..b063f0d2faa6 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c @@ -47,7 +47,7 @@ #include <plat/usb.h> #include <video/omapdss.h> #include <video/omap-panel-generic-dpi.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h> #include <plat/mcspi.h> #include <linux/input/matrix_keypad.h> @@ -118,19 +118,6 @@ static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev) gpio_set_value_cansleep(dssdev->reset_gpio, 0); } -static int devkit8000_panel_enable_dvi(struct omap_dss_device *dssdev) -{ - if (gpio_is_valid(dssdev->reset_gpio)) - gpio_set_value_cansleep(dssdev->reset_gpio, 1); - return 0; -} - -static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev) -{ - if (gpio_is_valid(dssdev->reset_gpio)) - gpio_set_value_cansleep(dssdev->reset_gpio, 0); -} - static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = { REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), }; @@ -154,15 +141,14 @@ static struct omap_dss_device devkit8000_lcd_device = { .phy.dpi.data_lines = 24, }; -static struct panel_dvi_platform_data dvi_panel = { - .platform_enable = devkit8000_panel_enable_dvi, - .platform_disable = devkit8000_panel_disable_dvi, +static struct tfp410_platform_data dvi_panel = { + .power_down_gpio = -1, }; static struct omap_dss_device devkit8000_dvi_device = { .name = "dvi", .type = OMAP_DISPLAY_TYPE_DPI, - .driver_name = "dvi", + .driver_name = "tfp410", .data = &dvi_panel, .phy.dpi.data_lines = 24, }; @@ -244,13 +230,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev, } /* gpio + 7 is "DVI_PD" (out, active low) */ - devkit8000_dvi_device.reset_gpio = gpio + 7; - ret = gpio_request_one(devkit8000_dvi_device.reset_gpio, - GPIOF_OUT_INIT_LOW, "DVI PowerDown"); - if (ret < 0) { - devkit8000_dvi_device.reset_gpio = -EINVAL; - printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n"); - } + dvi_panel.power_down_gpio = gpio + 7; return 0; } diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 930c0d380435..04816c96e829 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c @@ -32,7 +32,7 @@ #include <plat/gpmc.h> #include <plat/usb.h> #include <video/omapdss.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h> #include <plat/onenand.h> #include "mux.h" @@ -444,28 +444,15 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { .setup = igep_twl_gpio_setup, }; -static int igep2_enable_dvi(struct omap_dss_device *dssdev) -{ - gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1); - - return 0; -} - -static void igep2_disable_dvi(struct omap_dss_device *dssdev) -{ - gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0); -} - -static struct panel_dvi_platform_data dvi_panel = { - .platform_enable = igep2_enable_dvi, - .platform_disable = igep2_disable_dvi, - .i2c_bus_num = 3, +static struct tfp410_platform_data dvi_panel = { + .i2c_bus_num = 3, + .power_down_gpio = IGEP2_GPIO_DVI_PUP, }; static struct omap_dss_device igep2_dvi_device = { .type = OMAP_DISPLAY_TYPE_DPI, .name = "dvi", - .driver_name = "dvi", + .driver_name = "tfp410", .data = &dvi_panel, .phy.dpi.data_lines = 24, }; @@ -480,14 +467,6 @@ static struct omap_dss_board_info igep2_dss_data = { .default_device = &igep2_dvi_device, }; -static void __init igep2_display_init(void) -{ - int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH, - "GPIO_DVI_PUP"); - if (err) - pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n"); -} - static struct platform_device *igep_devices[] __initdata = { &igep_vwlan_device, }; @@ -668,7 +647,6 @@ static void __init igep_init(void) if (machine_is_igep0020()) { omap_display_init(&igep2_dss_data); - igep2_display_init(); igep2_init_smsc911x(); usbhs_init(&igep2_usbhs_bdata); } else { diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 7be8d659d91d..8ede8d20d7b2 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -42,7 +42,7 @@ #include <plat/board.h> #include "common.h" #include <video/omapdss.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h> #include <plat/gpmc.h> #include <plat/nand.h> #include <plat/usb.h> @@ -189,33 +189,17 @@ static struct mtd_partition omap3beagle_nand_partitions[] = { /* DSS */ -static int beagle_enable_dvi(struct omap_dss_device *dssdev) -{ - if (gpio_is_valid(dssdev->reset_gpio)) - gpio_set_value(dssdev->reset_gpio, 1); - - return 0; -} - -static void beagle_disable_dvi(struct omap_dss_device *dssdev) -{ - if (gpio_is_valid(dssdev->reset_gpio)) - gpio_set_value(dssdev->reset_gpio, 0); -} - -static struct panel_dvi_platform_data dvi_panel = { - .platform_enable = beagle_enable_dvi, - .platform_disable = beagle_disable_dvi, +static struct tfp410_platform_data dvi_panel = { .i2c_bus_num = 3, + .power_down_gpio = -1, }; static struct omap_dss_device beagle_dvi_device = { .type = OMAP_DISPLAY_TYPE_DPI, .name = "dvi", - .driver_name = "dvi", + .driver_name = "tfp410", .data = &dvi_panel, .phy.dpi.data_lines = 24, - .reset_gpio = -EINVAL, }; static struct omap_dss_device beagle_tv_device = { @@ -236,16 +220,6 @@ static struct omap_dss_board_info beagle_dss_data = { .default_device = &beagle_dvi_device, }; -static void __init beagle_display_init(void) -{ - int r; - - r = gpio_request_one(beagle_dvi_device.reset_gpio, GPIOF_OUT_INIT_LOW, - "DVI reset"); - if (r < 0) - printk(KERN_ERR "Unable to get DVI reset GPIO\n"); -} - #include "sdram-micron-mt46h32m32lf-6.h" static struct omap2_hsmmc_info mmc[] = { @@ -309,7 +283,7 @@ static int beagle_twl_gpio_setup(struct device *dev, if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) pr_err("%s: unable to configure EHCI_nOC\n", __func__); } - beagle_dvi_device.reset_gpio = beagle_config.reset_gpio; + dvi_panel.power_down_gpio = beagle_config.reset_gpio; gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, "nEN_USB_PWR"); @@ -552,7 +526,6 @@ static void __init omap3_beagle_init(void) omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); - beagle_display_init(); beagle_opp_init(); } diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index fd1b481c762c..ace3c675e9c2 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -46,7 +46,7 @@ #include "common.h" #include <plat/mcspi.h> #include <video/omapdss.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h> #include "mux.h" #include "sdram-micron-mt46h32m32lf-6.h" @@ -219,35 +219,14 @@ static struct omap_dss_device omap3_evm_tv_device = { .platform_disable = omap3_evm_disable_tv, }; -static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev) -{ - if (lcd_enabled) { - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); - return -EINVAL; - } - - gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1); - - dvi_enabled = 1; - return 0; -} - -static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev) -{ - gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0); - - dvi_enabled = 0; -} - -static struct panel_dvi_platform_data dvi_panel = { - .platform_enable = omap3_evm_enable_dvi, - .platform_disable = omap3_evm_disable_dvi, +static struct tfp410_platform_data dvi_panel = { + .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO, }; static struct omap_dss_device omap3_evm_dvi_device = { .name = "dvi", .type = OMAP_DISPLAY_TYPE_DPI, - .driver_name = "dvi", + .driver_name = "tfp410", .data = &dvi_panel, .phy.dpi.data_lines = 24, }; diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 4dffc95bddd2..4396bae91677 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c @@ -42,7 +42,7 @@ #include <plat/usb.h> #include <video/omapdss.h> #include <video/omap-panel-generic-dpi.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h> #include <plat/mcspi.h> #include <linux/input/matrix_keypad.h> @@ -92,9 +92,6 @@ static inline void __init omap3stalker_init_eth(void) #define LCD_PANEL_BKLIGHT_GPIO 210 #define ENABLE_VPLL2_DEV_GRP 0xE0 -static int lcd_enabled; -static int dvi_enabled; - static void __init omap3_stalker_display_init(void) { return; @@ -122,32 +119,14 @@ static struct omap_dss_device omap3_stalker_tv_device = { .platform_disable = omap3_stalker_disable_tv, }; -static int omap3_stalker_enable_dvi(struct omap_dss_device *dssdev) -{ - if (lcd_enabled) { - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); - return -EINVAL; - } - gpio_set_value(DSS_ENABLE_GPIO, 1); - dvi_enabled = 1; - return 0; -} - -static void omap3_stalker_disable_dvi(struct omap_dss_device *dssdev) -{ - gpio_set_value(DSS_ENABLE_GPIO, 0); - dvi_enabled = 0; -} - -static struct panel_dvi_platform_data dvi_panel = { - .platform_enable = omap3_stalker_enable_dvi, - .platform_disable = omap3_stalker_disable_dvi, +static struct tfp410_platform_data dvi_panel = { + .power_down_gpio = DSS_ENABLE_GPIO, }; static struct omap_dss_device omap3_stalker_dvi_device = { .name = "dvi", .type = OMAP_DISPLAY_TYPE_DPI, - .driver_name = "dvi", + .driver_name = "tfp410", .data = &dvi_panel, .phy.dpi.data_lines = 24, }; diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 8216e5f64a6a..59dd8b7f5b4f 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -42,7 +42,7 @@ #include "common.h" #include <plat/usb.h> #include <plat/mmc.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h> #include "hsmmc.h" #include "control.h" @@ -420,47 +420,22 @@ static struct omap_board_mux board_mux[] __initdata = { /* Display DVI */ #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 -static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev) -{ - gpio_set_value(dssdev->reset_gpio, 1); - return 0; -} - -static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev) -{ - gpio_set_value(dssdev->reset_gpio, 0); -} - /* Using generic display panel */ -static struct panel_dvi_platform_data omap4_dvi_panel = { - .platform_enable = omap4_panda_enable_dvi, - .platform_disable = omap4_panda_disable_dvi, - .i2c_bus_num = 3, +static struct tfp410_platform_data omap4_dvi_panel = { + .i2c_bus_num = 3, + .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, }; static struct omap_dss_device omap4_panda_dvi_device = { .type = OMAP_DISPLAY_TYPE_DPI, .name = "dvi", - .driver_name = "dvi", + .driver_name = "tfp410", .data = &omap4_dvi_panel, .phy.dpi.data_lines = 24, .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, .channel = OMAP_DSS_CHANNEL_LCD2, }; -static int __init omap4_panda_dvi_init(void) -{ - int r; - - /* Requesting TFP410 DVI GPIO and disabling it, at bootup */ - r = gpio_request_one(omap4_panda_dvi_device.reset_gpio, - GPIOF_OUT_INIT_LOW, "DVI PD"); - if (r) - pr_err("Failed to get DVI powerdown GPIO\n"); - - return r; -} - static struct gpio panda_hdmi_gpios[] = { { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, @@ -511,11 +486,6 @@ static struct omap_dss_board_info omap4_panda_dss_data = { static void __init omap4_panda_display_init(void) { - int r; - - r = omap4_panda_dvi_init(); - if (r) - pr_err("error initializing panda DVI\n"); omap_display_init(&omap4_panda_dss_data); diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 33aa3910b09e..5527c1979a16 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -46,7 +46,7 @@ #include "common.h" #include <video/omapdss.h> #include <video/omap-panel-generic-dpi.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h> #include <plat/gpmc.h> #include <mach/hardware.h> #include <plat/nand.h> @@ -167,32 +167,15 @@ static void __init overo_display_init(void) gpio_export(OVERO_GPIO_LCD_BL, 0); } -static int overo_panel_enable_dvi(struct omap_dss_device *dssdev) -{ - if (lcd_enabled) { - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); - return -EINVAL; - } - dvi_enabled = 1; - - return 0; -} - -static void overo_panel_disable_dvi(struct omap_dss_device *dssdev) -{ - dvi_enabled = 0; -} - -static struct panel_dvi_platform_data dvi_panel = { - .platform_enable = overo_panel_enable_dvi, - .platform_disable = overo_panel_disable_dvi, +static struct tfp410_platform_data dvi_panel = { .i2c_bus_num = 3, + .power_down_gpio = -1, }; static struct omap_dss_device overo_dvi_device = { .name = "dvi", .type = OMAP_DISPLAY_TYPE_DPI, - .driver_name = "dvi", + .driver_name = "tfp410", .data = &dvi_panel, .phy.dpi.data_lines = 24, }; |