diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-cm-t35.c')
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 909a8b91b564..c03df142ea67 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include <plat/usb.h> | 44 | #include <plat/usb.h> |
45 | #include <video/omapdss.h> | 45 | #include <video/omapdss.h> |
46 | #include <video/omap-panel-generic-dpi.h> | 46 | #include <video/omap-panel-generic-dpi.h> |
47 | #include <video/omap-panel-dvi.h> | 47 | #include <video/omap-panel-tfp410.h> |
48 | #include <plat/mcspi.h> | 48 | #include <plat/mcspi.h> |
49 | 49 | ||
50 | #include <mach/hardware.h> | 50 | #include <mach/hardware.h> |
@@ -218,25 +218,6 @@ static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev) | |||
218 | gpio_set_value(CM_T35_LCD_EN_GPIO, 0); | 218 | gpio_set_value(CM_T35_LCD_EN_GPIO, 0); |
219 | } | 219 | } |
220 | 220 | ||
221 | static int cm_t35_panel_enable_dvi(struct omap_dss_device *dssdev) | ||
222 | { | ||
223 | if (lcd_enabled) { | ||
224 | printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); | ||
225 | return -EINVAL; | ||
226 | } | ||
227 | |||
228 | gpio_set_value(CM_T35_DVI_EN_GPIO, 0); | ||
229 | dvi_enabled = 1; | ||
230 | |||
231 | return 0; | ||
232 | } | ||
233 | |||
234 | static void cm_t35_panel_disable_dvi(struct omap_dss_device *dssdev) | ||
235 | { | ||
236 | gpio_set_value(CM_T35_DVI_EN_GPIO, 1); | ||
237 | dvi_enabled = 0; | ||
238 | } | ||
239 | |||
240 | static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev) | 221 | static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev) |
241 | { | 222 | { |
242 | return 0; | 223 | return 0; |
@@ -260,15 +241,14 @@ static struct omap_dss_device cm_t35_lcd_device = { | |||
260 | .phy.dpi.data_lines = 18, | 241 | .phy.dpi.data_lines = 18, |
261 | }; | 242 | }; |
262 | 243 | ||
263 | static struct panel_dvi_platform_data dvi_panel = { | 244 | static struct tfp410_platform_data dvi_panel = { |
264 | .platform_enable = cm_t35_panel_enable_dvi, | 245 | .power_down_gpio = CM_T35_DVI_EN_GPIO, |
265 | .platform_disable = cm_t35_panel_disable_dvi, | ||
266 | }; | 246 | }; |
267 | 247 | ||
268 | static struct omap_dss_device cm_t35_dvi_device = { | 248 | static struct omap_dss_device cm_t35_dvi_device = { |
269 | .name = "dvi", | 249 | .name = "dvi", |
270 | .type = OMAP_DISPLAY_TYPE_DPI, | 250 | .type = OMAP_DISPLAY_TYPE_DPI, |
271 | .driver_name = "dvi", | 251 | .driver_name = "tfp410", |
272 | .data = &dvi_panel, | 252 | .data = &dvi_panel, |
273 | .phy.dpi.data_lines = 24, | 253 | .phy.dpi.data_lines = 24, |
274 | }; | 254 | }; |
@@ -316,7 +296,6 @@ static struct spi_board_info cm_t35_lcd_spi_board_info[] __initdata = { | |||
316 | static struct gpio cm_t35_dss_gpios[] __initdata = { | 296 | static struct gpio cm_t35_dss_gpios[] __initdata = { |
317 | { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" }, | 297 | { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" }, |
318 | { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" }, | 298 | { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" }, |
319 | { CM_T35_DVI_EN_GPIO, GPIOF_OUT_INIT_HIGH, "dvi enable" }, | ||
320 | }; | 299 | }; |
321 | 300 | ||
322 | static void __init cm_t35_init_display(void) | 301 | static void __init cm_t35_init_display(void) |
@@ -335,7 +314,6 @@ static void __init cm_t35_init_display(void) | |||
335 | 314 | ||
336 | gpio_export(CM_T35_LCD_EN_GPIO, 0); | 315 | gpio_export(CM_T35_LCD_EN_GPIO, 0); |
337 | gpio_export(CM_T35_LCD_BL_GPIO, 0); | 316 | gpio_export(CM_T35_LCD_BL_GPIO, 0); |
338 | gpio_export(CM_T35_DVI_EN_GPIO, 0); | ||
339 | 317 | ||
340 | msleep(50); | 318 | msleep(50); |
341 | gpio_set_value(CM_T35_LCD_EN_GPIO, 1); | 319 | gpio_set_value(CM_T35_LCD_EN_GPIO, 1); |
@@ -498,6 +476,10 @@ static struct twl4030_gpio_platform_data cm_t35_gpio_data = { | |||
498 | .setup = cm_t35_twl_gpio_setup, | 476 | .setup = cm_t35_twl_gpio_setup, |
499 | }; | 477 | }; |
500 | 478 | ||
479 | static struct twl4030_power_data cm_t35_power_data = { | ||
480 | .use_poweroff = true, | ||
481 | }; | ||
482 | |||
501 | static struct twl4030_platform_data cm_t35_twldata = { | 483 | static struct twl4030_platform_data cm_t35_twldata = { |
502 | /* platform_data for children goes here */ | 484 | /* platform_data for children goes here */ |
503 | .keypad = &cm_t35_kp_data, | 485 | .keypad = &cm_t35_kp_data, |
@@ -505,6 +487,7 @@ static struct twl4030_platform_data cm_t35_twldata = { | |||
505 | .vmmc1 = &cm_t35_vmmc1, | 487 | .vmmc1 = &cm_t35_vmmc1, |
506 | .vsim = &cm_t35_vsim, | 488 | .vsim = &cm_t35_vsim, |
507 | .vio = &cm_t35_vio, | 489 | .vio = &cm_t35_vio, |
490 | .power = &cm_t35_power_data, | ||
508 | }; | 491 | }; |
509 | 492 | ||
510 | static void __init cm_t35_init_i2c(void) | 493 | static void __init cm_t35_init_i2c(void) |