rk3288 lvds: add control lvds power domain
authorhjc <hjc@rock-chips.com>
Thu, 17 Apr 2014 06:50:00 +0000 (14:50 +0800)
committerhjc <hjc@rock-chips.com>
Thu, 17 Apr 2014 06:52:32 +0000 (14:52 +0800)
drivers/video/rockchip/transmitter/rk32_lvds.c
drivers/video/rockchip/transmitter/rk32_lvds.h

index 0e0b3d288cad2bb0d782f38ee76a0ecfeb8d40e8..2cedaf6f1920696789666686a04ee78ef8723e95 100755 (executable)
@@ -23,6 +23,7 @@ static int rk32_lvds_disable(void)
        writel_relaxed(0x00, lvds->regs + LVDS_CFG_REG_21); /*disable tx*/
        writel_relaxed(0xff, lvds->regs + LVDS_CFG_REG_c); /*disable pll*/
        clk_disable_unprepare(lvds->clk);
+       clk_disable_unprepare(lvds->pd);
        return 0;
 }
 
@@ -34,6 +35,7 @@ static int rk32_lvds_en(void)
        u32 i,j, val ;
 
        clk_prepare_enable(lvds->clk);
+       clk_prepare_enable(lvds->pd);
        screen->type = SCREEN_RGB;
        
        screen->lcdc_id = 1;
@@ -271,11 +273,16 @@ static int rk32_lvds_probe(struct platform_device *pdev)
                dev_err(&pdev->dev, "ioremap reg failed\n");
                return PTR_ERR(lvds->regs);
        }
-       lvds->clk = devm_clk_get(&pdev->dev,NULL);
+       lvds->clk = devm_clk_get(&pdev->dev,"pclk_lvds");
        if (IS_ERR(lvds->clk)) {
                dev_err(&pdev->dev, "get clk failed\n");
                return PTR_ERR(lvds->clk);
        }
+       lvds->pd = devm_clk_get(&pdev->dev,"pd_lvds");
+       if (IS_ERR(lvds->pd)) {
+               dev_err(&pdev->dev, "get clk failed\n");
+               return PTR_ERR(lvds->pd);
+       }       
        rk32_lvds = lvds;
        rk_fb_trsm_ops_register(&trsm_lvds_ops,SCREEN_LVDS);
        dev_info(&pdev->dev, "rk32 lvds driver probe success\n");
index d2f8d5691144b0e8289eb218b3e57674925c1d25..93a5ca2913d5ce222ee0a920dcc460b10b7c2bee 100755 (executable)
@@ -31,6 +31,7 @@ struct rk32_lvds {
        struct device           *dev;
        void __iomem            *regs;
        struct clk              *clk; /*phb clk*/
+       struct clk              *pd;
        struct rk_screen        screen;
 };