summaryrefslogtreecommitdiff
path: root/samsung/exynos_drm_dsim.c
diff options
context:
space:
mode:
authorLong Ling <longling@google.com>2021-01-06 17:18:36 -0800
committerLong Ling <longling@google.com>2021-02-11 23:45:25 +0000
commitde678dcb4bd53ba7c3ef08551758d0e58745c6f3 (patch)
tree385ac5f780c5eb29005a1538afa0f018a7a1937d /samsung/exynos_drm_dsim.c
parent87c783cf62fa1ff174d23edfba7fa6f0b3956261 (diff)
downloaddisplay-de678dcb4bd53ba7c3ef08551758d0e58745c6f3.tar.gz
drm: samsung: add symlink from panel to dsim
A dsim device is primary or secondary is decided by the panel connected to it. Add this symlink so user space could locate the primary or secondary dsim device. Bug: 171729515 Signed-off-by: Long Ling <longling@google.com> Change-Id: I119c83d9593940969c2a0ae010e51a3b47774567
Diffstat (limited to 'samsung/exynos_drm_dsim.c')
-rw-r--r--samsung/exynos_drm_dsim.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/samsung/exynos_drm_dsim.c b/samsung/exynos_drm_dsim.c
index bbd3f8e..e805efd 100644
--- a/samsung/exynos_drm_dsim.c
+++ b/samsung/exynos_drm_dsim.c
@@ -1401,6 +1401,10 @@ static int dsim_host_attach(struct mipi_dsi_host *host,
dsim->dsi_device = device;
}
+ ret = sysfs_create_link(&device->dev.kobj, &host->dev->kobj, "dsim");
+ if (ret)
+ dev_warn(&device->dev, "unable to link %s sysfs (%d)\n", "dsim", ret);
+
dsim_debug(dsim, "%s -\n", __func__);
return ret;
@@ -1423,6 +1427,7 @@ static int dsim_host_detach(struct mipi_dsi_host *host,
}
dsim->dsi_device = NULL;
+ sysfs_remove_link(&device->dev.kobj, "dsim");
dsim_info(dsim, "%s -\n", __func__);
return 0;
}