summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-05-15 17:19:44 +0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-05-19 17:26:58 +0400
commitc6e29d26df52224182560e10acefad4e4d6fd1ed (patch)
tree571472038320722eeb8e4d63005121cd84df11a1 /drivers/video
parentd80e02ef343379cfcef211ab4f042fc4a5b26100 (diff)
downloadlinux-c6e29d26df52224182560e10acefad4e4d6fd1ed.tar.xz
OMAPDSS: panel-dpi: enable-gpio
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap2/displays-new/panel-dpi.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
index dca6b10d1157..3636b61dc9b4 100644
--- a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
+++ b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
@@ -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);