Received: by 10.192.165.156 with SMTP id m28csp409605imm; Mon, 16 Apr 2018 02:15:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+yLe63cWKrsUG8p5ydAuZEpOZOYYB1lhHQgqIpOVI5X5LKILWgsCDlAkn2h4GhwiBsGzW+ X-Received: by 10.101.100.130 with SMTP id e2mr11936143pgv.301.1523870107871; Mon, 16 Apr 2018 02:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523870107; cv=none; d=google.com; s=arc-20160816; b=onuJYygX2k8Q1NTZshSgDfJqMa7XXQlCDG5DidgARVIuXNi4BzUHk6h3cp1y7lzTrr vdk+1WeYh57mXZi6jICG/fxiR4siVUG/l4NPZsDz0R04vmQUm8o22eAuWcE8KUb8m7fI R5+c3XejFP0R4TqSwpZ4DhiEtMz+vDlFB2jNKhQ3KvomisERShOVdjQ0dTiRNwnTIiXB exgWbJHykc7q97L+Et2/XQ8OoikXiZ/SIaMhKTlUdsjmd9JIcZVBN2FUc8Ttj/limGWw D6/5hgUNLsgYq08yrtwwT4K6KS0AtURl9SF/MWXHv36ps7IBNwi6TI5k6KDT27QeC1J0 3KUA== 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:dkim-signature :arc-authentication-results; bh=oW2jqOc//jXQYuyP7qrGIvRjP9YAn6KAS9uVE5MokTU=; b=TJe23XpINRa4ZWnzF1HTC2Yd9ptVz6rccHiWUKKJSR6eTwFxIE7uQsnwQltAo1hK/e bKHfdx+FbP/T27BCj/fgd17ktb/T3vqRoeFqdWAv4tnvp/BqJ8J2pRytDdr2BqJU0hXp UNj8aQfM75sKDg29b5cLvl6F92q0k5XttzEviFs8/YKD3yguuRFoDaBiJ1hMJ1wECQ6C MosDhByThMO2SizSE3IDqLZylwGRNgU/qz0TnEPHo+z1Mv3xKIdPmLr8ULAX854LqJy6 kvc3CJnKmKBlxU2xxPivJdo6mbllKM+dQOnnR5mNov/wYtdWfmjdk59Hkkojb4a6UExM OndA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aTjUBfZs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11-v6si3652582plt.284.2018.04.16.02.14.53; Mon, 16 Apr 2018 02:15:07 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=aTjUBfZs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754633AbeDPJNE (ORCPT + 99 others); Mon, 16 Apr 2018 05:13:04 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:41916 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754556AbeDPJNC (ORCPT ); Mon, 16 Apr 2018 05:13:02 -0400 Received: by mail-wr0-f193.google.com with SMTP id v24so6750503wra.8 for ; Mon, 16 Apr 2018 02:13:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=oW2jqOc//jXQYuyP7qrGIvRjP9YAn6KAS9uVE5MokTU=; b=aTjUBfZsC/O4s5mRc6NwNpRzlPAg6mV3sGGth5/Lq067XwXd7Xb20DZS8HX4dtfzd3 NMZqqplUa3B1dHkWqy17a3XD+4LCQOORnEn2ID5ySV8fNbO+g7J6CNrp8qBReyOHKMuJ VnkpVc8zbzsEyn7h0maNEIaQNW++nUFR2Vv+s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=oW2jqOc//jXQYuyP7qrGIvRjP9YAn6KAS9uVE5MokTU=; b=Q1JR2M9iZV6Bk7o32kOQ4d3t/6rI5riK7EuGIm7+vWb3payAgjgAPv4YHQhanp1cli 4m4To4AQM3kQ5PjesXFFRoJAsbPZ5HwgW0JtgImaUaNNNNjE2L3LOW7P4o+uuSGSechM z/NfB02iUybWVC0PqAPBkgzVWl2SwdZZlRKh2lgh926va/wl80yQX99VnRii+4IMOX1S VyGhuN+6GDFroPJFB80Niht71iH9PExL+rwIuzSLMyrIdgTzqdD61m3HhxhfSJXrZG6i /sjhJhRQ+m68z8RDGudmFsAL7bp86VPoBDjpHYBhQ6w6eYsVBfcRDRR5GlRoDE8pMwat dqzg== X-Gm-Message-State: ALQs6tCo+O4p/E1eNVeHGPJ08Kyc2P1EaM9vbKU6gQF2nMMFCocWG1Hz mT2pWB/AjlcQ1QgPI/ZHxVb0ZQ== X-Received: by 10.28.18.199 with SMTP id 190mr10453033wms.50.1523869980791; Mon, 16 Apr 2018 02:13:00 -0700 (PDT) Received: from dell ([2.27.167.70]) by smtp.gmail.com with ESMTPSA id d17sm11675874wrc.45.2018.04.16.02.12.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Apr 2018 02:12:59 -0700 (PDT) Date: Mon, 16 Apr 2018 10:12:57 +0100 From: Lee Jones To: Simon Horman Cc: Wolfram Sang , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Thierry Reding , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , linux-pwm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH RESEND] backlight: pwm_bl: don't use GPIOF_* with gpiod_get_direction Message-ID: <20180416091257.swbt7i6zjfbwysg2@dell> References: <20180410123241.25745-1-wsa+renesas@sang-engineering.com> <20180411073215.fzvh4ejj2kd7wam3@verge.net.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180411073215.fzvh4ejj2kd7wam3@verge.net.au> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Apr 2018, Simon Horman wrote: > On Tue, Apr 10, 2018 at 02:32:40PM +0200, Wolfram Sang wrote: > > The documentation was wrong, gpiod_get_direction() returns 0/1 instead > > of the GPIOF_* flags. The docs were fixed with commit 94fc73094abe47 > > ("gpio: correct docs about return value of gpiod_get_direction"). Now, > > fix this user (until a better, system-wide solution is in place). > > > > Signed-off-by: Wolfram Sang > > Acked-by: Daniel Thompson > > Reviewed-by: Simon Horman Thanks for the Reviewed-by Simon. I have applied it to the original mail. Do you know why you mail wasn't sent attached to the original thread? For some reason I received this mail on it's own i.e. not in reply to the original. > > --- > > > > Changes since V1: > > * rebased to top-of-linus-tree > > * added tag from Daniel, thanks! > > > > Through which tree does this need to go? > > > > drivers/video/backlight/pwm_bl.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c > > index 1c2289ddd555..0fa7d2bd0e48 100644 > > --- a/drivers/video/backlight/pwm_bl.c > > +++ b/drivers/video/backlight/pwm_bl.c > > @@ -301,14 +301,14 @@ static int pwm_backlight_probe(struct platform_device *pdev) > > > > /* > > * If the GPIO is not known to be already configured as output, that > > - * is, if gpiod_get_direction returns either GPIOF_DIR_IN or -EINVAL, > > - * change the direction to output and set the GPIO as active. > > + * is, if gpiod_get_direction returns either 1 or -EINVAL, change the > > + * direction to output and set the GPIO as active. > > * Do not force the GPIO to active when it was already output as it > > * could cause backlight flickering or we would enable the backlight too > > * early. Leave the decision of the initial backlight state for later. > > */ > > if (pb->enable_gpio && > > - gpiod_get_direction(pb->enable_gpio) != GPIOF_DIR_OUT) > > + gpiod_get_direction(pb->enable_gpio) != 0) > > gpiod_direction_output(pb->enable_gpio, 1); > > > > pb->power_supply = devm_regulator_get(&pdev->dev, "power"); -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog