]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge tag 'omap-cleanup-dss-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel...
authorOlof Johansson <olof@lixom.net>
Fri, 11 May 2012 06:51:21 +0000 (23:51 -0700)
committerOlof Johansson <olof@lixom.net>
Fri, 11 May 2012 06:51:21 +0000 (23:51 -0700)
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>
1  2 
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap4panda.c

index fd1b481c762c97576f1c9cb5503e9bd470a4a528,9919d6c1a531a182b0342adc47381bb8ac5bf996..ace3c675e9c22a15e1712f39a1fd95bdc42c0dc5
@@@ -46,7 -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 +219,14 @@@ static struct omap_dss_device omap3_evm
        .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,
  };
@@@ -630,13 -609,13 +609,13 @@@ static struct regulator_consumer_suppl
  
  static void __init omap3_evm_init(void)
  {
 +      struct omap_board_mux *obm;
 +
        omap3_evm_get_revision();
        regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
  
 -      if (cpu_is_omap3630())
 -              omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
 -      else
 -              omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
 +      obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
 +      omap3_mux_init(obm, OMAP_PACKAGE_CBB);
  
        omap_board_config = omap3_evm_config;
        omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
index 8216e5f64a6a854d8378327b5171df4ceee3d635,b26cd15f3c8bae241d2aab9c8f80d4671c09f0fc..59dd8b7f5b4f1a96edf1bcd066dc08306aa268a4
@@@ -42,7 -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"
@@@ -231,7 -231,7 +231,7 @@@ static struct platform_device omap_vwla
        },
  };
  
 -struct wl12xx_platform_data omap_panda_wlan_data  __initdata = {
 +static struct wl12xx_platform_data omap_panda_wlan_data  __initdata = {
        /* PANDA ref clock is 38.4 MHz */
        .board_ref_clock = 2,
  };
@@@ -420,47 -420,23 +420,22 @@@ static struct omap_board_mux board_mux[
  /* 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,
  };
  
 -struct omap_dss_device omap4_panda_dvi_device = {
 +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" },
@@@ -509,13 -485,8 +484,8 @@@ static struct omap_dss_board_info omap4
        .default_device = &omap4_panda_dvi_device,
  };
  
 -void __init omap4_panda_display_init(void)
 +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);