disp: msm: dsi: update gpio mappings using tlmm api
Use tlmm api to retrieve and populate address mappings of the panel gpio pins participating in the VM swtich on Trusted UI. Change-Id: Ibf2d13eac3fe907b729f4c2b54c63a3808022583 Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
This commit is contained in:
@@ -5443,22 +5443,49 @@ static int dsi_display_get_io_resources(struct msm_io_res *io_res, void *data)
|
||||
{
|
||||
int rc = 0;
|
||||
struct dsi_display *display;
|
||||
struct platform_device *pdev;
|
||||
int te_gpio, avdd_gpio;
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
display = (struct dsi_display *)data;
|
||||
|
||||
pdev = display->pdev;
|
||||
if (!pdev)
|
||||
return -EINVAL;
|
||||
|
||||
rc = dsi_ctrl_get_io_resources(io_res);
|
||||
if (rc)
|
||||
goto end;
|
||||
return rc;
|
||||
|
||||
rc = dsi_phy_get_io_resources(io_res);
|
||||
if (rc)
|
||||
goto end;
|
||||
return rc;
|
||||
|
||||
display = (struct dsi_display *)data;
|
||||
rc = dsi_panel_get_io_resources(display->panel, io_res);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
te_gpio = of_get_named_gpio(pdev->dev.of_node, "qcom,platform-te-gpio", 0);
|
||||
if (gpio_is_valid(te_gpio)) {
|
||||
rc = msm_dss_get_gpio_io_mem(te_gpio, &io_res->mem);
|
||||
if (rc) {
|
||||
DSI_ERR("[%s] failed to retrieve the te gpio address\n",
|
||||
display->panel->name);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
avdd_gpio = of_get_named_gpio(pdev->dev.of_node,
|
||||
"qcom,avdd-regulator-gpio", 0);
|
||||
if (gpio_is_valid(avdd_gpio)) {
|
||||
rc = msm_dss_get_gpio_io_mem(avdd_gpio, &io_res->mem);
|
||||
if (rc)
|
||||
DSI_ERR("[%s] failed to retrieve the avdd gpio address\n",
|
||||
display->panel->name);
|
||||
}
|
||||
|
||||
end:
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user