Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755073AbdLOLxS (ORCPT ); Fri, 15 Dec 2017 06:53:18 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:39184 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754455AbdLOLxO (ORCPT ); Fri, 15 Dec 2017 06:53:14 -0500 X-Google-Smtp-Source: ACJfBovVT/94BA8VaE9DQK6GRMN8TWF0UHuZ7oZl7nRV3hDfuYwpRn2nonoX2NLELu9xmH/dvYF9CQ== Date: Fri, 15 Dec 2017 11:53:09 +0000 From: Daniel Thompson To: Robert Jarzmik Cc: Lee Jones , Jingoo Han , Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] backlight: tdo24m: add the reset line gpio Message-ID: <20171215115309.ez7odo7sh5zz7vge@oak.lan> References: <20171013194250.9001-1-robert.jarzmik@free.fr> <20171013194250.9001-2-robert.jarzmik@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171013194250.9001-2-robert.jarzmik@free.fr> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1450 Lines: 54 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 > --- > 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 > +#include > #include > #include > #include > @@ -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 >