All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Vokáč Michal" <Michal.Vokac@ysoft.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 2/4] video: ssd1307fb: Do not hard code active-low reset sequence
Date: Thu, 20 Dec 2018 12:33:59 +0000	[thread overview]
Message-ID: <20181220123359.GF2188@piout.net> (raw)
In-Reply-To: <1545308005-51559-3-git-send-email-michal.vokac@ysoft.com>

On 20/12/2018 12:13:55+0000, Vokáč Michal wrote:
> The SSD130x OLED display reset signal is active low. Now the reset
> sequence is implemented in such a way that users are forced to
> define reset-gpios as GPIO_ACTIVE_HIGH in DT to make the reset work.
> 
> Do not hard code the active-low sequence into the driver but instead
> allow the user to specify the gpio as GPIO_ACTIVE_LOW to reflect
> the real world.
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

> ---
> Changes from v1:
>  - Add R-by from Rob
> 
>  drivers/video/fbdev/ssd1307fb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> index 4061a20..3b361bc 100644
> --- a/drivers/video/fbdev/ssd1307fb.c
> +++ b/drivers/video/fbdev/ssd1307fb.c
> @@ -667,10 +667,10 @@ static int ssd1307fb_probe(struct i2c_client *client,
>  
>  	if (par->reset) {
>  		/* Reset the screen */
> -		gpiod_set_value_cansleep(par->reset, 0);
> -		udelay(4);
>  		gpiod_set_value_cansleep(par->reset, 1);
>  		udelay(4);
> +		gpiod_set_value_cansleep(par->reset, 0);
> +		udelay(4);
>  	}
>  
>  	if (par->vbat_reg) {
> -- 
> 2.1.4
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Vokáč Michal" <Michal.Vokac@ysoft.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 2/4] video: ssd1307fb: Do not hard code active-low reset sequence
Date: Thu, 20 Dec 2018 13:33:59 +0100	[thread overview]
Message-ID: <20181220123359.GF2188@piout.net> (raw)
In-Reply-To: <1545308005-51559-3-git-send-email-michal.vokac@ysoft.com>

On 20/12/2018 12:13:55+0000, Vokáč Michal wrote:
> The SSD130x OLED display reset signal is active low. Now the reset
> sequence is implemented in such a way that users are forced to
> define reset-gpios as GPIO_ACTIVE_HIGH in DT to make the reset work.
> 
> Do not hard code the active-low sequence into the driver but instead
> allow the user to specify the gpio as GPIO_ACTIVE_LOW to reflect
> the real world.
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

> ---
> Changes from v1:
>  - Add R-by from Rob
> 
>  drivers/video/fbdev/ssd1307fb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> index 4061a20..3b361bc 100644
> --- a/drivers/video/fbdev/ssd1307fb.c
> +++ b/drivers/video/fbdev/ssd1307fb.c
> @@ -667,10 +667,10 @@ static int ssd1307fb_probe(struct i2c_client *client,
>  
>  	if (par->reset) {
>  		/* Reset the screen */
> -		gpiod_set_value_cansleep(par->reset, 0);
> -		udelay(4);
>  		gpiod_set_value_cansleep(par->reset, 1);
>  		udelay(4);
> +		gpiod_set_value_cansleep(par->reset, 0);
> +		udelay(4);
>  	}
>  
>  	if (par->vbat_reg) {
> -- 
> 2.1.4
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-12-20 12:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 12:13 [PATCH v2 0/4] Fix ssd1307fb OLED driver reset Vokáč Michal
2018-12-20 12:13 ` Vokáč Michal
2018-12-20 12:13 ` [PATCH v2 1/4] dt-bindings: display: ssd1307fb: Remove reset-active-low from examples Vokáč Michal
2018-12-20 12:13   ` Vokáč Michal
2018-12-20 12:33   ` Alexandre Belloni
2018-12-20 12:33     ` Alexandre Belloni
2018-12-20 12:13 ` [PATCH v2 2/4] video: ssd1307fb: Do not hard code active-low reset sequence Vokáč Michal
2018-12-20 12:13   ` Vokáč Michal
2018-12-20 12:33   ` Alexandre Belloni [this message]
2018-12-20 12:33     ` Alexandre Belloni
2018-12-20 12:13 ` [PATCH v2 3/4] ARM: dts: imx28-cfa10036: Fix the reset gpio signal polarity Vokáč Michal
2018-12-20 12:13   ` Vokáč Michal
2018-12-20 12:34   ` Alexandre Belloni
2018-12-20 12:34     ` Alexandre Belloni
2018-12-20 12:13 ` [PATCH v2 4/4] ARM: mxs: cfa10036: Fixup OLED display reset polarity Vokáč Michal
2018-12-20 12:13   ` Vokáč Michal
2018-12-20 12:35   ` Alexandre Belloni
2018-12-20 12:35     ` Alexandre Belloni

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=20181220123359.GF2188@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=Michal.Vokac@ysoft.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fabio.estevam@nxp.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.