Received: by 10.192.165.156 with SMTP id m28csp867450imm; Fri, 13 Apr 2018 09:09:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ldww1MGQdSoCIOvbwML9e4KgsBqixX93C7QTdiUOjyRIGln0T5NwYdXDFzRnNr31AUnMq X-Received: by 2002:a17:902:108a:: with SMTP id c10-v6mr5725839pla.22.1523635789926; Fri, 13 Apr 2018 09:09:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523635789; cv=none; d=google.com; s=arc-20160816; b=eWOZpAHQY8JkZffcF9vi+cTjt5d5mgQa2m+Orrn8oouP8yd8mnpA6jLhB8CQ6v6MIR uNy1ESMi55iOMUJFxMVUu0OfFrZ1XxvQSH+b3e9hmBnjb1F+R90u/Oje3Gi4HNajVhdW LAT5BfPsCv+A0NMBFf1nvVhd3TDiQgS8Dgj5SwtO25UOzYx/mI1693TseiHJHjnzJbZT bLLPsbKkaCArYZLhzfwBgjBWrV9pX8Cs+p/+h+0TyyEpGxmArXj8Ih6vOKxmH4MCzC+v SDrq/mppIBSTyLxPPtN91weO7NCSgFSgdjNVe3aGlEbirQaqj23Tu8QfkMBhW8cCVFIO ct+A== 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-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=r6d3u3qfZB2oxFUwnMGCzP8hjsdAzO7TxZ1iI5m4R00=; b=ww/I2nBTsQNUxUS9KtmvozXQvx4mf3K5CK7yrFLutoVspyq1243JmMDmIBA4SZSR1E SLZ5B3cbUcSveTIVQ4Djc7NOwl7xwcp93Q67kOvg/4yCVa1YL8+jXzdDS4M2AjnN5n+T Sn5qqGcxOHfP68HdM5LU25a/ZYnRbuMcraEvcuttGyg77Z7+BfxV3//coPwGirwjvkwx HDKhJjUoxTDwDA/KnJIVwGrxD+0v3iiHI/ytSbqnVVk0Lic+EOJMBZMkhyQ6R4wvKB4F H4VlkkuVMmzHrkQTxsiHscHQ1qdYXl5wpwlxaRQeCBNxAeSrqpkSsutblDsL7b6RO8Ag 2CJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=UTeXfpCb; 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 f15-v6si5677914plr.310.2018.04.13.09.09.34; Fri, 13 Apr 2018 09:09:49 -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=fail header.i=@ffwll.ch header.s=google header.b=UTeXfpCb; 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 S1752081AbeDMQIb (ORCPT + 99 others); Fri, 13 Apr 2018 12:08:31 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:37048 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750981AbeDMQI2 (ORCPT ); Fri, 13 Apr 2018 12:08:28 -0400 Received: by mail-wr0-f196.google.com with SMTP id l49so9452428wrl.4 for ; Fri, 13 Apr 2018 09:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=r6d3u3qfZB2oxFUwnMGCzP8hjsdAzO7TxZ1iI5m4R00=; b=UTeXfpCbd1VA9BeopUbwB8aSjDOoVFmxj8iOHYejmtGJwEKPQd4+mKVmgC5G32s7ft gHIRjEN9Z6kUVRkdbBcom8/8eh8QWBvbWGfA1ai1bnj2E9CorRzdRgtJHSHXZnXQeHEv FDHlqXh0k/xgc58PDp3r0pleDyok0IWi8jTKU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=r6d3u3qfZB2oxFUwnMGCzP8hjsdAzO7TxZ1iI5m4R00=; b=cphKrrW/DM7Y9iYJ9mXnnFUXm+t6cyfyDb6af2W7ZXN2pzc0Qais9BI4XQh1EtHS0H eWMXiz/w/Ny+fspz6S+sQEY/yQsQpeW7H+pDijq4qk/GWYjV4AJAj73lAmqNnLeIMlMn BNhdqeHbU2oowAE6UTaT+yiefiyhUg/ElVlDM7hz2uHqQM2nIhud3UVum1eYKrI0kVO0 QRA6/vzDySIWq5wKk8E0WzWNVmnFE7+wyG+DnHhf9BE0kioW0lz8F8C/tILMoX40umVP sZPmEs7A3CeUzk2h8ULMkEajGgFBfji7fVEyabEnj/uzc0+AyIlHdrSw4rvAKV1vQn7H 6SbQ== X-Gm-Message-State: ALQs6tCp7SSXWX+enwfXVw7IBfSHqKcYiQwFoxKW3Vdi+YAgc7oGa6Ks 7nzWbPAPhd1fxlMVyvrlyDIyiA== X-Received: by 10.80.240.138 with SMTP id v10mr20951544edl.90.1523635707093; Fri, 13 Apr 2018 09:08:27 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5635:0:39d2:f87e:2033:9f6]) by smtp.gmail.com with ESMTPSA id z4sm3426881edm.44.2018.04.13.09.08.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Apr 2018 09:08:26 -0700 (PDT) Date: Fri, 13 Apr 2018 18:08:24 +0200 From: Daniel Vetter To: Simon Horman Cc: Wolfram Sang , linux-pwm@vger.kernel.org, Daniel Thompson , Bartlomiej Zolnierkiewicz , Jingoo Han , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Thierry Reding , linux-fbdev@vger.kernel.org, Lee Jones Subject: Re: [PATCH RESEND] backlight: pwm_bl: don't use GPIOF_* with gpiod_get_direction Message-ID: <20180413160824.GD31310@phenom.ffwll.local> Mail-Followup-To: Simon Horman , Wolfram Sang , linux-pwm@vger.kernel.org, Daniel Thompson , Bartlomiej Zolnierkiewicz , Jingoo Han , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Thierry Reding , linux-fbdev@vger.kernel.org, Lee Jones References: <20180410123241.25745-1-wsa+renesas@sang-engineering.com> <20180411073215.fzvh4ejj2kd7wam3@verge.net.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180411073215.fzvh4ejj2kd7wam3@verge.net.au> X-Operating-System: Linux phenom 4.15.0-1-amd64 User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 11, 2018 at 09:32:16AM +0200, 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 > > > --- > > > > Changes since V1: > > * rebased to top-of-linus-tree > > * added tag from Daniel, thanks! > > > > Through which tree does this need to go? I think Daniel Thompson has one ... -Daniel > > > > 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"); > > -- > > 2.11.0 > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch