Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1058636imm; Tue, 2 Oct 2018 01:51:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV63J45pfTTQiocn+d+sftvttb/YMkJjbf4IEO4waGxTkR069RYWfwTFtzR1+Yq/Dwc++JUgC X-Received: by 2002:a17:902:108a:: with SMTP id c10-v6mr15487292pla.272.1538470301728; Tue, 02 Oct 2018 01:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538470301; cv=none; d=google.com; s=arc-20160816; b=oinaVi9vpBZWC8otBT0Jg40OTbVbrc+xrIxYj5KDlIPDgTKlRRBiql/jc/iD+7uorT FB1i1eVl2Nf3cQFkj8vr8uz3Q5DJ1uAB6HLB2ImkGXetCsuncqsM36eGPjdK6CtXmOIb LJe7CNRUGAAk9BHbD1Gd0JCB8DlAiBA3GIWG4Fzo6DX6sSl4azbhJNbg0I1ibNmbuE8I 0d2VXYqawBfoFAzH23VStvnYlFw/gkL5osjEfqGhsHfTGswnQV8Aly5ouHeNewdIIqXz ZXCRKzpzNCz4TMhOcmKwafs18y5zH5nay6Lf224MM5F2fyooVAuJcIM72rxHLY+O5OqP AyIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=AyYUqurOl9rRYbWJ9UixfUVWW2Zle+Y3O+08iXypBFQ=; b=cknzDJhkQVTav2uSsE0XrdNI6+1VCaCNl1XTIA59cnNM6ZCr/ygbOSl0OMpJ38tXv8 FvLCOHYAgPPkDUOmdO23LdgeKmNinKbn5e+PoNsAtGht+45UWqbAgWpVo1o27EPCpb9c w1w/ou0EH6EUxNbOvbqjPZeQSFKWshI24DEA4jPIh90+DOfm7IjkaS3kAS0xEU903aHE xDf7CZJT+TRDFOWqfELynbuD5QwTHkruKuWY+26m9h9JnSzqtEFd2HMCmcOVIpp7uBUB WLcGZWcvUMgicH6hMdT/vBTpc8TO10lbddH2NIcBHzC8j6+4ipQfD0Ry6V0CAFF3q8uZ ZmkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=haHgkvDv; 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 h8-v6si15061951pll.511.2018.10.02.01.51.26; Tue, 02 Oct 2018 01:51:41 -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=haHgkvDv; 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 S1726935AbeJBPcR (ORCPT + 99 others); Tue, 2 Oct 2018 11:32:17 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:41226 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726693AbeJBPcQ (ORCPT ); Tue, 2 Oct 2018 11:32:16 -0400 Received: by mail-io1-f65.google.com with SMTP id q4-v6so1453677iob.8 for ; Tue, 02 Oct 2018 01:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AyYUqurOl9rRYbWJ9UixfUVWW2Zle+Y3O+08iXypBFQ=; b=haHgkvDvJqCpoOhNhVoA4G7ZiV+5TINC0b7IHP/Sy17bVtfeZ28xD+isvzmRrhV+mI HV2i/apJ/nDJ/1oGTxdA+ZgPXpn7cvhw2YZP0aRn5J38udAGhYbq4UEUQSpxxdb4mX66 3CEj0VRcjoEBWDG5Jha3+Szx9wMLzeu5K5Kqo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AyYUqurOl9rRYbWJ9UixfUVWW2Zle+Y3O+08iXypBFQ=; b=M1zGflxrkuyO5NceYgPdwh6PhpyrnrqYbC5BEjpPvdElfOGqbSfvKij4dJ38fvIsO9 5PDQTvtS3tBMzLJwGGUSScaZecLBFOLVPV8dyK5pqbJypRERQqDed0iSYOf6hS1YYOx2 YaxvLTqO9KfTOE1y8TUzALe1YECXjsQ1ld18/Y3d3gXKaiRGTxyM/H7Rp3+8jCSFAeaj 3bbFg97L09ZQrIxetVnQdEpPt+jRRS0qRSVojp6QZ5Ih3zBiUyVkBG9ovANRFBeR7EP3 yyjaHcmNP2Q6A26f3QalZisWJA+aofrPM33F4WPFZT52RCTxKdGJjhv9wkeuf/vnG5Wz 28mQ== X-Gm-Message-State: ABuFfojxrPYDZNmuPYpO9a9AwdSIGs6+bxgKXhNazdRcM4wRy8Fq37tE xF9xJYNbEIjfPQe0TVwcVYphSqao495a0viwHj0lkQ== X-Received: by 2002:a6b:630a:: with SMTP id p10-v6mr9752493iog.175.1538470206239; Tue, 02 Oct 2018 01:50:06 -0700 (PDT) MIME-Version: 1.0 References: <20181001214905.12149-1-swboyd@chromium.org> In-Reply-To: <20181001214905.12149-1-swboyd@chromium.org> From: Linus Walleij Date: Tue, 2 Oct 2018 10:49:53 +0200 Message-ID: Subject: Re: [PATCH] pinctrl: msm: Actually use function 0 for gpio selection To: Stephen Boyd Cc: "linux-kernel@vger.kernel.org" , linux-arm-msm@vger.kernel.org, "open list:GPIO SUBSYSTEM" , Doug Anderson , Bjorn Andersson , Niklas Cassel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 1, 2018 at 11:49 PM 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 Patch applied with all the tags. Yours, Linus Walleij