exynos-gsc: add devicetree binding optional flag for lcd-wb
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 6 Jan 2015 08:19:04 +0000 (17:19 +0900)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 13 Apr 2015 10:44:49 +0000 (12:44 +0200)
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>
Documentation/devicetree/bindings/media/exynos5-gsc.txt
drivers/media/platform/exynos-gsc/gsc-core.c

index 0604d42f38d1941526d47ad11a958a2a83797f97..d526777a3abd04d244c46fdd729e3df93bb86917 100644 (file)
@@ -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 {
index fd2891c886a3a25ace88512b811419c1c646a801..2edc40bc55473df9d14dcfa448253c778bc7a86b 100644 (file)
@@ -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) {