From: Seung-Woo Kim Date: Tue, 6 Jan 2015 08:19:04 +0000 (+0900) Subject: exynos-gsc: add devicetree binding optional flag for lcd-wb X-Git-Tag: submit/tizen/20150416.081342~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=751cd6d88d9620c83042641b52fdd244408a3947;p=platform%2Fkernel%2Flinux-exynos.git 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 --- 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 fd2891c886a3..2edc40bc5547 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1084,9 +1084,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) {