Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support

From
Tomi Valkeinen <hidden>
Date
2014-04-24 09:52:42
Also in
linux-arm-kernel, linux-devicetree, linux-omap
Reply to
Tony Lindgren, 2014-04-18
On 18/04/14 18:51, Tony Lindgren wrote:
quoted
+	gpio = of_get_gpio(node, 0);
+	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+		ddata->enable_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse enable gpio\n");
+		return gpio;
+	}
We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
gpio_backlight_probe_dt is doing. 
Instead of doing it with the old gpio API, and checking the 'active'
flag everywhere, I think we can use the new gpiod API which handles the
polarity automatically.

I attached prototype patches (based on -rc2) for panel dpi using that
approach. It's a bit messier than I'd like, because for non-DT boot we
need to request the gpio using the old API, and then convert it to
gpio_desc. We can remove that code when all the boards use DT.

I've compiled tested this only, as I don't have DPI panels I could use.
I did try similar approach for TFP410, and it seemed to work fine.

 Tomi

Attachments

Thread (56 messages) 56 messages, 5 authors, last reply 2014-04-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help