From: hjc Date: Thu, 17 Apr 2014 06:50:00 +0000 (+0800) Subject: rk3288 lvds: add control lvds power domain X-Git-Tag: firefly_0821_release~5529 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=64c4609a6a1749830550e4100ec9195ffa4c869e;p=firefly-linux-kernel-4.4.55.git rk3288 lvds: add control lvds power domain --- diff --git a/drivers/video/rockchip/transmitter/rk32_lvds.c b/drivers/video/rockchip/transmitter/rk32_lvds.c index 0e0b3d288cad..2cedaf6f1920 100755 --- a/drivers/video/rockchip/transmitter/rk32_lvds.c +++ b/drivers/video/rockchip/transmitter/rk32_lvds.c @@ -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"); diff --git a/drivers/video/rockchip/transmitter/rk32_lvds.h b/drivers/video/rockchip/transmitter/rk32_lvds.h index d2f8d5691144..93a5ca2913d5 100755 --- a/drivers/video/rockchip/transmitter/rk32_lvds.h +++ b/drivers/video/rockchip/transmitter/rk32_lvds.h @@ -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; };