mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Lee Jones <lee.jones@linaro.org>,
	Jingoo Han <jingoohan1@gmail.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] backlight: tdo24m: add the reset line gpio
Date: Fri, 15 Dec 2017 11:53:09 +0000	[thread overview]
Message-ID: <20171215115309.ez7odo7sh5zz7vge@oak.lan> (raw)
In-Reply-To: <20171013194250.9001-2-robert.jarzmik@free.fr>

On Fri, Oct 13, 2017 at 09:42:48PM +0200, Robert Jarzmik wrote:
> 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?


>  	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
> 

  reply	other threads:[~2017-12-15 11:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 19:42 [PATCH v2 1/3] backlight: tdo24m: fix the spi cs between transfers Robert Jarzmik
2017-10-13 19:42 ` [PATCH v2 2/3] backlight: tdo24m: add the reset line gpio Robert Jarzmik
2017-12-15 11:53   ` Daniel Thompson [this message]
2017-12-16 11:39     ` Robert Jarzmik
2017-12-17 20:57       ` Daniel Thompson
2017-12-24 11:55       ` Robert Jarzmik
2018-01-03  9:49         ` Daniel Thompson
2017-10-13 19:42 ` [PATCH v2 3/3] backlight: tdo24m: add model and status sysfs entries Robert Jarzmik
2017-12-15 14:32   ` Daniel Thompson
2017-12-16 11:40     ` Robert Jarzmik
2017-12-14 20:03 ` [PATCH v2 1/3] backlight: tdo24m: fix the spi cs between transfers Robert Jarzmik
2017-12-15 11:56   ` Daniel Thompson
2017-12-15 11:40 ` Daniel Thompson
2017-12-16 11:45   ` Robert Jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171215115309.ez7odo7sh5zz7vge@oak.lan \
    --to=daniel.thompson@linaro.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert.jarzmik@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®