]> git.karo-electronics.de Git - linux-beck.git/commitdiff
OMAPDSS: panel-dpi: enable-gpio
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 15 May 2014 13:19:44 +0000 (16:19 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 19 May 2014 13:26:58 +0000 (16:26 +0300)
The enable gpio should be optional, but the driver returns an error if
it doesn't get the gpio.

So change the driver to accept -ENOENT error.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Joachim Eastwood <manabian@gmail.com>
drivers/video/fbdev/omap2/displays-new/panel-dpi.c

index dca6b10d11575f214843c39db99c3579887b45fe..3636b61dc9b4296d0255f89daee0cde1e0860f0c 100644 (file)
@@ -210,14 +210,18 @@ static int panel_dpi_probe_of(struct platform_device *pdev)
        struct gpio_desc *gpio;
 
        gpio = devm_gpiod_get(&pdev->dev, "enable");
+
        if (IS_ERR(gpio)) {
-               dev_err(&pdev->dev, "failed to parse enable gpio\n");
-               return PTR_ERR(gpio);
+               if (PTR_ERR(gpio) != -ENOENT)
+                       return PTR_ERR(gpio);
+               else
+                       gpio = NULL;
        } else {
                gpiod_direction_output(gpio, 0);
-               ddata->enable_gpio = gpio;
        }
 
+       ddata->enable_gpio = gpio;
+
        ddata->backlight_gpio = -ENOENT;
 
        r = of_get_display_timing(node, "panel-timing", &timing);