From mboxrd@z Thu Jan 1 00:00:00 1970 From: Niklas Cassel Subject: Re: [PATCH] pinctrl: msm: Actually use function 0 for gpio selection Date: Tue, 2 Oct 2018 10:47:40 +0200 Message-ID: <20181002084740.GA5499@centauri.lan> References: <20181001214905.12149-1-swboyd@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20181001214905.12149-1-swboyd@chromium.org> Sender: linux-kernel-owner@vger.kernel.org To: Stephen Boyd Cc: Linus Walleij , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, Doug Anderson , Bjorn Andersson List-Id: linux-gpio@vger.kernel.org On Mon, Oct 01, 2018 at 02:49:05PM -0700, Stephen Boyd wrote: > This code needs to select function #0, which is the first int in the > array of functions, not the number 0 which may or may not be the > function for "GPIO mode" per the enum mapping. We were getting lucky on > SDM845, where this was tested, because the function 0 matched the enum > value for "GPIO mode". On other platforms, e.g. MSM8996, the gpio enum > value is the last one in the list so this code doesn't work and we see a > warning at boot. Fix it by grabbing the first element out of the array > of functions. > > Cc: Doug Anderson > Cc: Bjorn Andersson > Cc: Niklas Cassel > Reported-by: Niklas Cassel > Fixes: 1de7ddb3a15c ("pinctrl: msm: Mux out gpio function with gpio_request()") > Signed-off-by: Stephen Boyd Tested-by: Niklas Cassel