Commit 5c4e5995 authored by Archit Taneja's avatar Archit Taneja Committed by Tomi Valkeinen

arm: omap: board-overo: use lb035q02 dpi panel's gpio handling

The overo board file currently requests gpios required by the lb035q02 panel,
and provides platform_enable/disable callbacks to configure them.

These tasks have been moved to the lb035q02 dpi panel driver itself and should
be removed from the board files.

The lb035q02 panel driver uses generic dpi panel's platform data struct
internally. Remove the gpio requests and the platform callbacks from the board
file. Add the gpio information to the generic dpi panel platform data struct so
that it's passed to the panel driver.
Signed-off-by: default avatarArchit Taneja <archit@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
parent fa2a02f2
...@@ -145,28 +145,9 @@ static inline void __init overo_init_smsc911x(void) { return; } ...@@ -145,28 +145,9 @@ static inline void __init overo_init_smsc911x(void) { return; }
#endif #endif
/* DSS */ /* DSS */
static int lcd_enabled;
static int dvi_enabled;
#define OVERO_GPIO_LCD_EN 144 #define OVERO_GPIO_LCD_EN 144
#define OVERO_GPIO_LCD_BL 145 #define OVERO_GPIO_LCD_BL 145
static struct gpio overo_dss_gpios[] __initdata = {
{ OVERO_GPIO_LCD_EN, GPIOF_OUT_INIT_HIGH, "OVERO_GPIO_LCD_EN" },
{ OVERO_GPIO_LCD_BL, GPIOF_OUT_INIT_HIGH, "OVERO_GPIO_LCD_BL" },
};
static void __init overo_display_init(void)
{
if (gpio_request_array(overo_dss_gpios, ARRAY_SIZE(overo_dss_gpios))) {
printk(KERN_ERR "could not obtain DSS control GPIOs\n");
return;
}
gpio_export(OVERO_GPIO_LCD_EN, 0);
gpio_export(OVERO_GPIO_LCD_BL, 0);
}
static struct tfp410_platform_data dvi_panel = { static struct tfp410_platform_data dvi_panel = {
.i2c_bus_num = 3, .i2c_bus_num = 3,
.power_down_gpio = -1, .power_down_gpio = -1,
...@@ -187,30 +168,13 @@ static struct omap_dss_device overo_tv_device = { ...@@ -187,30 +168,13 @@ static struct omap_dss_device overo_tv_device = {
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
}; };
static int overo_panel_enable_lcd(struct omap_dss_device *dssdev)
{
if (dvi_enabled) {
printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
return -EINVAL;
}
gpio_set_value(OVERO_GPIO_LCD_EN, 1);
gpio_set_value(OVERO_GPIO_LCD_BL, 1);
lcd_enabled = 1;
return 0;
}
static void overo_panel_disable_lcd(struct omap_dss_device *dssdev)
{
gpio_set_value(OVERO_GPIO_LCD_EN, 0);
gpio_set_value(OVERO_GPIO_LCD_BL, 0);
lcd_enabled = 0;
}
static struct panel_generic_dpi_data lcd43_panel = { static struct panel_generic_dpi_data lcd43_panel = {
.name = "samsung_lte430wq_f0c", .name = "samsung_lte430wq_f0c",
.platform_enable = overo_panel_enable_lcd, .num_gpios = 2,
.platform_disable = overo_panel_disable_lcd, .gpios = {
OVERO_GPIO_LCD_EN,
OVERO_GPIO_LCD_BL
},
}; };
static struct omap_dss_device overo_lcd43_device = { static struct omap_dss_device overo_lcd43_device = {
...@@ -223,13 +187,20 @@ static struct omap_dss_device overo_lcd43_device = { ...@@ -223,13 +187,20 @@ static struct omap_dss_device overo_lcd43_device = {
#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \ #if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE) defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
static struct panel_generic_dpi_data lcd35_panel = {
.num_gpios = 2,
.gpios = {
OVERO_GPIO_LCD_EN,
OVERO_GPIO_LCD_BL
},
};
static struct omap_dss_device overo_lcd35_device = { static struct omap_dss_device overo_lcd35_device = {
.type = OMAP_DISPLAY_TYPE_DPI, .type = OMAP_DISPLAY_TYPE_DPI,
.name = "lcd35", .name = "lcd35",
.driver_name = "lgphilips_lb035q02_panel", .driver_name = "lgphilips_lb035q02_panel",
.phy.dpi.data_lines = 24, .phy.dpi.data_lines = 24,
.platform_enable = overo_panel_enable_lcd, .data = &lcd35_panel,
.platform_disable = overo_panel_disable_lcd,
}; };
#endif #endif
...@@ -504,7 +475,6 @@ static void __init overo_init(void) ...@@ -504,7 +475,6 @@ static void __init overo_init(void)
usbhs_init(&usbhs_bdata); usbhs_init(&usbhs_bdata);
overo_spi_init(); overo_spi_init();
overo_init_smsc911x(); overo_init_smsc911x();
overo_display_init();
overo_init_led(); overo_init_led();
overo_init_keys(); overo_init_keys();
omap_twl4030_audio_init("overo", NULL); omap_twl4030_audio_init("overo", NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment