Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1056136imm; Tue, 2 Oct 2018 01:48:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV61nx5psxLkYvJgmwq8vIGSxRy+cRcHBg568Ztj1N5FYaswHknVyY6O2tx6J14Se781nZk1S X-Received: by 2002:a62:1407:: with SMTP id 7-v6mr12075061pfu.28.1538470093299; Tue, 02 Oct 2018 01:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538470093; cv=none; d=google.com; s=arc-20160816; b=Lz6hUrz5KzMDlcP7Lnhsn5iMmGgyxrsdDbLri2ekof+dYCOAWh/95vXABnUf/HhdjW xEYKrUsa1p/lkd/lxIzIQAOxwbvyfqjOLr+sdbYMBLRWu3EWlnsBdkVZKgY5sHactvGd tltCpPkJwZxdmgeSknpcmGHAYFoogtMDPviflr+GxPGKC0Nj3mac38VkOXmpxcd4thGc pUBsigjH+jOd0cnvq2Np+GeTODhtF4ZgqvFpjBoi+kGQnDAfoJq7LdvvQ85Cy0X4aZmW Xu+2PkzGoOaOCxhrB39uyCy4TojKub6m0tGPJ8iBAv0EYZ7/cb9LLBmN/0G34QzT/7E4 9rLw== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=klW9Tz2535F/OE7Wyq8OS7WuBlhAjWlTAD2jp6YiDv8=; b=n4RbVyQWIjt5Xqq5TcQ1k9Pa0BM8ck9ltpZixZ890XVCfbg5es/rauT/N3jZXpfCiT nKfLhim5pzwmbClqiYVFawnyRhnW/nCU6lPIBz9sh+FRdpUv7jQnP9/RoynLP02t9crM DYUCRG3nVLSuOLCTM/dGgroHhPOqJJWIjHQtgBEJZ6OLOeh47dxbZsocHxXYvFFavcu3 vP3PxUjx1mc9rTKhSy2uy4KBRzVFndRUo22g6be6knZgu6LmG61mhwGkipgxYPzpShUF 7c4kbdBhJECfmPhGamGZrSn/MtLnCpgz6pe5Z9NrdvVXd6fg6rl7Cpadqc7S1M2VY9PG UXxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FsUwF9xl; 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 k10-v6si14633790pgj.381.2018.10.02.01.47.57; Tue, 02 Oct 2018 01:48:13 -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=FsUwF9xl; 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 S1727016AbeJBP3y (ORCPT + 99 others); Tue, 2 Oct 2018 11:29:54 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34306 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726809AbeJBP3y (ORCPT ); Tue, 2 Oct 2018 11:29:54 -0400 Received: by mail-lj1-f194.google.com with SMTP id f8-v6so1020203ljk.1 for ; Tue, 02 Oct 2018 01:47:43 -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:in-reply-to:user-agent; bh=klW9Tz2535F/OE7Wyq8OS7WuBlhAjWlTAD2jp6YiDv8=; b=FsUwF9xllvfNVmS7jKMMo9EFOaTw9+pwPTQQlKz/KUWC3XVNUW/bhzRp7xjgh7zLD+ BUfLyIUIyL9TYLywszVrgtKl5AX0TFiQjnCXYX5g3I7iwLONpw8iKU6DCW5sny61S6Dv RkWhDy3nUwVy0BehnmxC2S+Yd86YewK7MC6rI= 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:in-reply-to:user-agent; bh=klW9Tz2535F/OE7Wyq8OS7WuBlhAjWlTAD2jp6YiDv8=; b=LJpZutPkY8JO0HqbYKIcDXE8Ruu4AMrJ+q0qKI8461VbS7oknDOnIxg6bp/g1hJxhj tcU9Ol3XBWhIyNAKU7+4poygM2uBnwjioHXNQDrRiOmJhX52urkEsfmcwwdl9y4tyYaA exLR9JKjfEwl2dLrO1G/fgCxdUmEzOzcEXcb+gBFq8rl8AJlJDA3f8WMoVtBahd6IrOk MlqFjCYUhJ3OMIcdcU7y+38hpR7JBX9LH8b08X217RgIb47pWQ52+Dcje1mcmNhxMWKP HlVed4+8lrvNmPgwDvYGfSn0m+UjjO/ejbB2B+bwryW1kxghROZ/IL+C8BfLmTvoJ3S2 p9JA== X-Gm-Message-State: ABuFfojUQnSEa/iCRaJA0tr04Bmj4nrURwx3mBD/NK2xMLAkXHcyNwFd dv+pp0vy3M3OAZrN9uYEsmdwEQ== X-Received: by 2002:a2e:921a:: with SMTP id k26-v6mr8726296ljg.163.1538470062911; Tue, 02 Oct 2018 01:47:42 -0700 (PDT) Received: from centauri.lan (h-229-118.A785.priv.bahnhof.se. [5.150.229.118]) by smtp.gmail.com with ESMTPSA id m88-v6sm3252658lje.14.2018.10.02.01.47.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Oct 2018 01:47:42 -0700 (PDT) Date: Tue, 2 Oct 2018 10:47:40 +0200 From: Niklas Cassel 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 Subject: Re: [PATCH] pinctrl: msm: Actually use function 0 for gpio selection Message-ID: <20181002084740.GA5499@centauri.lan> References: <20181001214905.12149-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181001214905.12149-1-swboyd@chromium.org> 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 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