From 96812c7446f29f84ec22a1b904a8b7a8837bac43 Mon Sep 17 00:00:00 2001 From: hjc Date: Sat, 26 Oct 2013 15:05:56 +0800 Subject: [PATCH] rk3026 lcdc: fix the not normal way of io request --- drivers/video/rockchip/lcdc/rk3188_lcdc.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/video/rockchip/lcdc/rk3188_lcdc.c b/drivers/video/rockchip/lcdc/rk3188_lcdc.c index bfb0187002df..2ce3ed5ae08d 100755 --- a/drivers/video/rockchip/lcdc/rk3188_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3188_lcdc.c @@ -1042,7 +1042,7 @@ static int rk3188_lcdc_ioctl(struct rk_lcdc_device_driver *dev_drv, unsigned int static int rk3188_lcdc_early_suspend(struct rk_lcdc_device_driver *dev_drv) { - + struct rk3188_lcdc_device *lcdc_dev = container_of(dev_drv,struct rk3188_lcdc_device,driver); @@ -1067,8 +1067,13 @@ static int rk3188_lcdc_early_suspend(struct rk_lcdc_device_driver *dev_drv) } rk3188_lcdc_clk_disable(lcdc_dev); #if defined(CONFIG_ARCH_RK3026) - iomux_set(GPIO2_B0); - gpio_direction_output(RK30_PIN2_PB0,0); + int gpio_dclk = iomux_mode_to_gpio(LCDC0_DCLK); + int ret = gpio_request(gpio_dclk,NULL); + if(unlikely(ret < 0)){ + printk("Failed to request gpio:lcdc dclk\n"); + return ret; + } + gpio_direction_output(gpio_dclk,GPIO_LOW); #endif return 0; } @@ -1081,6 +1086,8 @@ static int rk3188_lcdc_early_resume(struct rk_lcdc_device_driver *dev_drv) int __iomem *c; int v; #if defined(CONFIG_ARCH_RK3026) + int gpio_dclk = iomux_mode_to_gpio(LCDC0_DCLK); + gpio_free(gpio_dclk); iomux_set(LCDC0_DCLK); #endif if(dev_drv->screen_ctr_info->io_enable) //power on -- 2.34.1