Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6e29d26 authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: default avatarJoachim Eastwood <manabian@gmail.com>
parent d80e02ef
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -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");
		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);