Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1215376imu; Thu, 20 Dec 2018 12:11:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/UZZNviltp7bF0TX27AFrI/HSmIyTQbb1Nike8FTcYIPVl0qqy/fj4rn5PR3I2lLLiCJz9p X-Received: by 2002:a17:902:b595:: with SMTP id a21mr24393674pls.120.1545336669998; Thu, 20 Dec 2018 12:11:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545336669; cv=none; d=google.com; s=arc-20160816; b=y1y4fYmEJGkWSSfrBzoO7DB7hVduWMSrHPaQPK11xJoj8W8dWbLIDhuYtzL/R4JisD BkAtGqW7M6ggCVNws3Fnmlhf1MgW6WVzFk5993oL6DNxwGKg1SHKhrjreMuU5IIjKQuP DnQwTKF6a9UUmqnIPNBULNJDniJ2dgrKazhLyEwGs/2KGCFMSwz7RczillXXu6+ccGL6 Imihbk+UlwRT1XxxQ/xCWqCGrbKS31ak7W8rh28BnX/utXVU6nXgIrSwagF7Yq7gO1bt f6hSdHM4ZFfhKtB886iGJbcNvf3nbuCr8TgboaX/LK5Co+aMXEg49kD4Dn2RhfIfKXkz mxSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ma6Ht3B0/GRWSxDylepeEOHA8+cExdgzHWz81N/xHYw=; b=kqCy6keF6e4oNNtjlfVdwh/UV9NhdozvQz4v/2dC3+rNptJ3XTERtcVBXN+5FAXGt+ CcjZGCJ2U5ZH99Sc71g2jn8zYkaqKTWUt37ewmJ/Kmro4URzLcTWj/YK5uQHrBxmJ5Ky XNV8SC7zvV13TBoOjwY/dptR2VHVg5eCoHsRkVQnccrHLw9zSq74wwKHQ1N1QD7VFncm 0Tb0ZKEkwDIppWYn8/a0GyNnwRK6AupX5j7/fmGbWv4ftmPEqtCOct5Bhw6NphdEeQBo QYT6KmsgUNmWv/hKf2S+u7a3u37a/BtgNt4csKN5Nt6gk7GXeuKXWvhriFtF/tI+8bOe Ta3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b24si18669538pgi.308.2018.12.20.12.10.41; Thu, 20 Dec 2018 12:11:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732260AbeLTMeN (ORCPT + 99 others); Thu, 20 Dec 2018 07:34:13 -0500 Received: from mail.bootlin.com ([62.4.15.54]:60642 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731119AbeLTMeM (ORCPT ); Thu, 20 Dec 2018 07:34:12 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id B7DB5207CF; Thu, 20 Dec 2018 13:34:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 8784D2072C; Thu, 20 Dec 2018 13:33:59 +0100 (CET) Date: Thu, 20 Dec 2018 13:33:59 +0100 From: Alexandre Belloni To: =?utf-8?B?Vm9rw6HEjQ==?= Michal Cc: Rob Herring , Bartlomiej Zolnierkiewicz , Shawn Guo , Fabio Estevam , Maxime Ripard , "linux-fbdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" Subject: Re: [PATCH v2 2/4] video: ssd1307fb: Do not hard code active-low reset sequence Message-ID: <20181220123359.GF2188@piout.net> References: <1545308005-51559-1-git-send-email-michal.vokac@ysoft.com> <1545308005-51559-3-git-send-email-michal.vokac@ysoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1545308005-51559-3-git-send-email-michal.vokac@ysoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Michal Vokáč Reviewed-by: Alexandre Belloni > --- > 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