summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2015-01-06 17:19:04 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:44:01 +0900
commit6acedbb2b01080aba5f19bd4eeb9cb6ccc020c5e (patch)
treef23d0d5f47169d5462f691328528db11c2e6a1f8
parent259bb69d86dcba885a876842133ddd26382a453e (diff)
exynos-gsc: add devicetree binding optional flag for lcd-wb
This patch adds optional flag for lcd-wb of gsc. If the flag is set, then the gsc hw is controlled by drm driver. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rw-r--r--Documentation/devicetree/bindings/media/exynos5-gsc.txt4
-rw-r--r--drivers/media/platform/exynos-gsc/gsc-core.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/media/exynos5-gsc.txt b/Documentation/devicetree/bindings/media/exynos5-gsc.txt
index 0604d42f38d1..d526777a3abd 100644
--- a/Documentation/devicetree/bindings/media/exynos5-gsc.txt
+++ b/Documentation/devicetree/bindings/media/exynos5-gsc.txt
@@ -7,6 +7,10 @@ Required properties:
- reg: should contain G-Scaler physical address location and length.
- interrupts: should contain G-Scaler interrupt number
+Optional properties:
+- samsung,lcd-wb: this property must be present if the IP block has the LCD
+ writeback input.
+
Example:
gsc_0: gsc@0x13e00000 {
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index 245fc113bd03..66ed97abcb2a 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -1112,9 +1112,11 @@ static int gsc_probe(struct platform_device *pdev)
if (!gsc)
return -ENOMEM;
- if (dev->of_node)
+ if (dev->of_node) {
gsc->id = of_alias_get_id(pdev->dev.of_node, "gsc");
- else
+ if (of_property_read_bool(dev->of_node, "samsung,lcd-wb"))
+ return -ENODEV;
+ } else
gsc->id = pdev->id;
if (gsc->id >= drv_data->num_entities) {