Thread (6 messages) 6 messages, 2 authors, 2017-12-15

Re: [PATCH v2 2/3] backlight: tdo24m: add the reset line gpio

From: Daniel Thompson <hidden>
Date: 2017-12-15 11:53:18
Also in: lkml

On Fri, Oct 13, 2017 at 09:42:48PM +0200, Robert Jarzmik wrote:
quoted hunk ↗ jump to hunk
The Toppoly panels have a global reset line. Add an optional gpio
control for this line, for platforms which have the ability to drive it.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 drivers/video/backlight/tdo24m.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c
index e4bd63e9db6b..e4b2dfabf192 100644
--- a/drivers/video/backlight/tdo24m.c
+++ b/drivers/video/backlight/tdo24m.c
@@ -10,6 +10,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/gpio/consumer.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/device.h>
@@ -32,6 +33,7 @@ struct tdo24m {
 	struct spi_message	msg;
 	struct spi_transfer	xfer;
 	uint8_t			*buf;
+	struct gpio_desc	*xres;
Why do we need a write-only variable?

quoted hunk ↗ jump to hunk
 	int (*adj_mode)(struct tdo24m *lcd, int mode);
 	int color_invert;
@@ -364,6 +366,7 @@ static int tdo24m_probe(struct spi_device *spi)
 	if (lcd->buf = NULL)
 		return -ENOMEM;
 
+	lcd->xres = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_LOW);
devm_gpiod_get_optional() would be better, if only for its commenting
value.

Also, this adds a new optional property, doesn't the devicetree binding 
docs need to be update to match this?


Daniel.

 	m = &lcd->msg;
 	x = &lcd->xfer;
 
-- 
2.11.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help