screen->lcd_en_gpio = INVALID_GPIO;
MIPI_SCREEN_DBG("%s: Can not get child => mipi_power_ctr.\n", __func__);
} else {
- grandchildnode = of_get_child_by_name(childnode, "mipi_lcd_rst");
+ grandchildnode = of_find_node_by_name(childnode, "mipi_lcd_rst");
if (!grandchildnode) {
screen->lcd_rst_gpio = INVALID_GPIO;
MIPI_SCREEN_DBG("%s: Can not read property: mipi_lcd_rst.\n", __func__);
MIPI_SCREEN_DBG("lcd->lcd_rst_gpio=%d,dsi->lcd_rst_atv_val=%d\n", screen->lcd_rst_gpio, screen->lcd_rst_atv_val);
}
- grandchildnode = of_get_child_by_name(childnode, "mipi_lcd_en");
+ grandchildnode = of_find_node_by_name(childnode, "mipi_lcd_en");
if (!grandchildnode) {
screen->lcd_en_gpio = INVALID_GPIO;
MIPI_SCREEN_DBG("%s: Can not read property: mipi_lcd_en.\n", __func__);
/* enable ref clock */
clk_prepare_enable(dsi->phy.refclk);
clk_prepare_enable(dsi->dsi_pclk);
- clk_prepare_enable(dsi->dsi_pd);
udelay(10);
switch (dsi->host.lane) {
clk_prepare_enable(dsi->dsi_host_pclk);
if (dsi->ops.id == DWC_DSI_VERSION_RK312x) {
clk_prepare_enable(dsi->h2p_hclk);
- clk_prepare_enable(dsi->dsi_pd);
- } else
- clk_prepare_enable(dsi->dsi_pd);
+ }
udelay(10);
rk32_dsi_set_bits(dsi, 0, phy_shutdownz);
clk_disable_unprepare(dsi->phy.refclk);
clk_disable_unprepare(dsi->dsi_pclk);
- clk_disable_unprepare(dsi->dsi_pd);
return 0;
}
if (dsi->ops.id == DWC_DSI_VERSION_RK312x) {
clk_disable_unprepare(dsi->h2p_hclk);
- clk_disable_unprepare(dsi->dsi_pd);
- } else
- clk_disable_unprepare(dsi->dsi_pd);
+ }
return 0;
}
printk(KERN_INFO "%s\n", data->label);
if (dsi->ops.id == DWC_DSI_VERSION) {
res_host = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dsi->host.membase = devm_request_and_ioremap(&pdev->dev, res_host);
- if (!dsi->host.membase) {
+ dsi->host.membase = devm_ioremap_resource(&pdev->dev, res_host);
+ if (IS_ERR(dsi->host.membase)) {
dev_err(&pdev->dev, "get resource mipi host membase fail!\n");
- return -ENOMEM;
+ return PTR_ERR(dsi->host.membase);
}
} else if (dsi->ops.id == DWC_DSI_VERSION_RK312x ||
dsi->ops.id == DWC_DSI_VERSION_RK3368) {
res_host = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mipi_dsi_host");
- dsi->host.membase = devm_request_and_ioremap(&pdev->dev, res_host);
- if (!dsi->host.membase) {
+ dsi->host.membase = devm_ioremap_resource(&pdev->dev, res_host);
+ if (IS_ERR(dsi->host.membase)) {
dev_err(&pdev->dev, "get resource mipi host membase fail!\n");
- return -ENOMEM;
+ return PTR_ERR(dsi->host.membase);
}
res_phy = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mipi_dsi_phy");
- dsi->phy.membase = devm_request_and_ioremap(&pdev->dev, res_phy);
- if (!dsi->phy.membase) {
+ dsi->phy.membase = devm_ioremap_resource(&pdev->dev, res_phy);
+ if (IS_ERR(dsi->phy.membase)) {
dev_err(&pdev->dev, "get resource mipi phy membase fail!\n");
- return -ENOMEM;
+ return PTR_ERR(dsi->phy.membase);
}
}
dev_err(&pdev->dev, "get pclk_mipi_dsi_host clock fail\n");
return PTR_ERR(dsi->dsi_host_pclk);
}
-
- dsi->dsi_pd = devm_clk_get(&pdev->dev, "pd_mipi_dsi");
- if (unlikely(IS_ERR(dsi->dsi_pd))) {
- dev_err(&pdev->dev, "get pd_mipi_dsi clock fail\n");
- return PTR_ERR(dsi->dsi_pd);
- }
}
if (dsi->ops.id == DWC_DSI_VERSION_RK312x) {
dev_err(&pdev->dev, "get hclk_vio_h2p clock fail\n");
return PTR_ERR(dsi->h2p_hclk);
}
-
- dsi->dsi_pd = devm_clk_get(&pdev->dev, "pd_mipi_dsi");
- if (unlikely(IS_ERR(dsi->dsi_pd))) {
- dev_err(&pdev->dev, "get pd_mipi_dsi clock fail\n");
- return PTR_ERR(dsi->dsi_pd);
- }
}
- if (dsi->ops.id == DWC_DSI_VERSION) {
- dsi->dsi_pd = devm_clk_get(&pdev->dev, "pd_mipi_dsi");
- if (unlikely(IS_ERR(dsi->dsi_pd))) {
- dev_err(&pdev->dev, "get pd_mipi_dsi clock fail\n");
- return PTR_ERR(dsi->dsi_pd);
- }
- }
dsi->host.irq = platform_get_irq(pdev, 0);
if (dsi->host.irq < 0) {
dev_err(&pdev->dev, "no irq resource?\n");
} else if (dsi->ops.id == DWC_DSI_VERSION_RK3368)
clk_prepare_enable(dsi->dsi_host_pclk);
- clk_prepare_enable(dsi->dsi_pd);
dsi->clk_on = 1;
udelay(10);
}