From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH v3 5/5] pinctrl: sunxi: Use pin number when calling sunxi_pmx_set Date: Fri, 5 Feb 2016 12:15:49 +0100 Message-ID: <20160205111549.GC31506@lukather> References: <1454542430-16572-1-git-send-email-k@japko.eu> <1454542430-16572-6-git-send-email-k@japko.eu> Reply-To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KN5l+BnMqAQyZLvT" Return-path: Content-Disposition: inline In-Reply-To: <1454542430-16572-6-git-send-email-k-P4rZei/IPtg@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Krzysztof Adamski Cc: inus Walleij , Chen-Yu Tsai , Hans de Goede , Lee Jones , Rob Herring , Jens Kuske , Fabian Frederick , Vishnu Patekar , linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: linux-gpio@vger.kernel.org --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline On Thu, Feb 04, 2016 at 12:33:50AM +0100, Krzysztof Adamski wrote: > sunxi_pmx_set accepts pin number and then calculates offset by > subtracting pin_base from it. sunxi_pinctrl_gpio_get, on the other hand, > gets offset so we have to convert it to pin number so we won't get > negative value in sunxi_pmx_set. > > This was only used on A10 so far, where there is only one GPIO chip with > pin_base set to 0 so it didn't matter. However H3 also requires this > workaround but have two pinmux sections, triggering problem for PL port. > > Signed-off-by: Krzysztof Adamski Acked-by: Maxime Ripard Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --KN5l+BnMqAQyZLvT--