mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
drm/rockchip: dsi: compatible for GKI
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com> Change-Id: I64f7b209a5121ef3f4d4b7b1f27358ec56430e1d
This commit is contained in:
@@ -1051,10 +1051,8 @@ static const struct component_ops dw_mipi_dsi_rockchip_ops = {
|
||||
.unbind = dw_mipi_dsi_rockchip_unbind,
|
||||
};
|
||||
|
||||
static int dw_mipi_dsi_rockchip_host_attach(void *priv_data,
|
||||
struct mipi_dsi_device *device)
|
||||
static int dw_mipi_dsi_rockchip_component_add(struct dw_mipi_dsi_rockchip *dsi)
|
||||
{
|
||||
struct dw_mipi_dsi_rockchip *dsi = priv_data;
|
||||
struct device *second;
|
||||
int ret;
|
||||
|
||||
@@ -1081,10 +1079,8 @@ static int dw_mipi_dsi_rockchip_host_attach(void *priv_data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dw_mipi_dsi_rockchip_host_detach(void *priv_data,
|
||||
struct mipi_dsi_device *device)
|
||||
static int dw_mipi_dsi_rockchip_component_del(struct dw_mipi_dsi_rockchip *dsi)
|
||||
{
|
||||
struct dw_mipi_dsi_rockchip *dsi = priv_data;
|
||||
struct device *second;
|
||||
|
||||
second = dw_mipi_dsi_rockchip_find_second(dsi);
|
||||
@@ -1096,11 +1092,6 @@ static int dw_mipi_dsi_rockchip_host_detach(void *priv_data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct dw_mipi_dsi_host_ops dw_mipi_dsi_rockchip_host_ops = {
|
||||
.attach = dw_mipi_dsi_rockchip_host_attach,
|
||||
.detach = dw_mipi_dsi_rockchip_host_detach,
|
||||
};
|
||||
|
||||
static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
@@ -1208,7 +1199,6 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
|
||||
dsi->pdata.base = dsi->base;
|
||||
dsi->pdata.max_data_lanes = dsi->cdata->max_data_lanes;
|
||||
dsi->pdata.phy_ops = &dw_mipi_dsi_rockchip_phy_ops;
|
||||
dsi->pdata.host_ops = &dw_mipi_dsi_rockchip_host_ops;
|
||||
dsi->pdata.priv_data = dsi;
|
||||
platform_set_drvdata(pdev, dsi);
|
||||
|
||||
@@ -1221,6 +1211,12 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
|
||||
goto err_clkdisable;
|
||||
}
|
||||
|
||||
ret = dw_mipi_dsi_rockchip_component_add(dsi);
|
||||
if (ret < 0) {
|
||||
dw_mipi_dsi_remove(dsi->dmd);
|
||||
goto err_clkdisable;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_clkdisable:
|
||||
@@ -1232,9 +1228,8 @@ static int dw_mipi_dsi_rockchip_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct dw_mipi_dsi_rockchip *dsi = platform_get_drvdata(pdev);
|
||||
|
||||
if (dsi->devcnt == 0)
|
||||
component_del(dsi->dev, &dw_mipi_dsi_rockchip_ops);
|
||||
|
||||
dw_mipi_dsi_rockchip_component_del(dsi);
|
||||
dw_mipi_dsi_remove(dsi->dmd);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user