diff options
-rw-r--r-- | drivers/video/mxc/mxcfb_claa_wvga.c | 5 | ||||
-rw-r--r-- | drivers/video/mxc/mxcfb_seiko_wvga.c | 25 |
2 files changed, 29 insertions, 1 deletions
diff --git a/drivers/video/mxc/mxcfb_claa_wvga.c b/drivers/video/mxc/mxcfb_claa_wvga.c index a5200e4872b3..6359a76e84a6 100644 --- a/drivers/video/mxc/mxcfb_claa_wvga.c +++ b/drivers/video/mxc/mxcfb_claa_wvga.c @@ -181,6 +181,11 @@ static int lcd_suspend(struct platform_device *pdev, pm_message_t state) static int lcd_resume(struct platform_device *pdev) { + struct mxc_lcd_platform_data *plat = pdev->dev.platform_data; + + if (plat && plat->reset) + plat->reset(); + return 0; } #else diff --git a/drivers/video/mxc/mxcfb_seiko_wvga.c b/drivers/video/mxc/mxcfb_seiko_wvga.c index 9b3e9fddafe7..b5de61a5ab7e 100644 --- a/drivers/video/mxc/mxcfb_seiko_wvga.c +++ b/drivers/video/mxc/mxcfb_seiko_wvga.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -128,6 +128,9 @@ static int __devinit lcd_probe(struct platform_device *pdev) if (plat->reset) plat->reset(); + if (plat->get_pins) + plat->get_pins(); + io_reg = regulator_get(&pdev->dev, plat->io_reg); if (IS_ERR(io_reg)) io_reg = NULL; @@ -148,6 +151,7 @@ static int __devinit lcd_probe(struct platform_device *pdev) fb_register_client(&nb); + platform_set_drvdata(pdev, plat); plcd_dev = pdev; return 0; @@ -155,12 +159,16 @@ static int __devinit lcd_probe(struct platform_device *pdev) static int __devexit lcd_remove(struct platform_device *pdev) { + struct mxc_lcd_platform_data *plat = pdev->dev.platform_data; + fb_unregister_client(&nb); lcd_poweroff(); if (io_reg) regulator_put(io_reg); if (core_reg) regulator_put(core_reg); + if (plat->put_pins) + plat->put_pins(); return 0; } @@ -173,6 +181,11 @@ static int lcd_suspend(struct platform_device *pdev, pm_message_t state) static int lcd_resume(struct platform_device *pdev) { + struct mxc_lcd_platform_data *plat = pdev->dev.platform_data; + + if (plat && plat->reset) + plat->reset(); + return 0; } #else @@ -198,9 +211,14 @@ static struct platform_driver lcd_driver = { */ static void lcd_poweron(void) { + struct mxc_lcd_platform_data *plat = platform_get_drvdata(plcd_dev); + if (lcd_on) return; + if (plat->enable_pins) + plat->enable_pins(); + dev_dbg(&plcd_dev->dev, "turning on LCD\n"); if (core_reg) regulator_enable(core_reg); @@ -215,12 +233,17 @@ static void lcd_poweron(void) */ static void lcd_poweroff(void) { + struct mxc_lcd_platform_data *plat = platform_get_drvdata(plcd_dev); + lcd_on = 0; dev_dbg(&plcd_dev->dev, "turning off LCD\n"); if (io_reg) regulator_disable(io_reg); if (core_reg) regulator_disable(core_reg); + + if (plat->disable_pins) + plat->disable_pins(); } static int __init seiko_wvga_lcd_init(void) |