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-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@free-electrons.com (Maxime Ripard) Date: Fri, 5 Feb 2016 12:15:49 +0100 Subject: [PATCH v3 5/5] pinctrl: sunxi: Use pin number when calling sunxi_pmx_set In-Reply-To: <1454542430-16572-6-git-send-email-k@japko.eu> References: <1454542430-16572-1-git-send-email-k@japko.eu> <1454542430-16572-6-git-send-email-k@japko.eu> Message-ID: <20160205111549.GC31506@lukather> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752724AbcBELPx (ORCPT ); Fri, 5 Feb 2016 06:15:53 -0500 Received: from down.free-electrons.com ([37.187.137.238]:52922 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751686AbcBELPv (ORCPT ); Fri, 5 Feb 2016 06:15:51 -0500 Date: Fri, 5 Feb 2016 12:15:49 +0100 From: Maxime Ripard To: Krzysztof Adamski Cc: inus Walleij , Chen-Yu Tsai , Hans de Goede , Lee Jones , Rob Herring , Jens Kuske , Fabian Frederick , Vishnu Patekar , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v3 5/5] pinctrl: sunxi: Use pin number when calling sunxi_pmx_set Message-ID: <20160205111549.GC31506@lukather> References: <1454542430-16572-1-git-send-email-k@japko.eu> <1454542430-16572-6-git-send-email-k@japko.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline In-Reply-To: <1454542430-16572-6-git-send-email-k@japko.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > Signed-off-by: Krzysztof Adamski Acked-by: Maxime Ripard Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --KN5l+BnMqAQyZLvT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWtIRlAAoJEBx+YmzsjxAgapMP/RcTWmat2joqlbKk3XYVtfZr /oPPrEeyCZC0xx4YNcVM/i/9cU8TbgI2vuYA+Lbnp7NbcqrOV+B/64VdHWsN32AX DV5FLZIT07sC+u23OOVigfyBQEJVKdH9Pc0lykQrNXBQhJBEreIaDO4VcDInguxl 110DYKMbP5IUv2RmjOv8nlDr/ve5ydNrzmOLZo/+4DHvEnthuLemOnf/uwDU8+vs Qdxyq2c6KSJ7WiJ8ahKaQEdOy/MKyAXieGSBeA2QXxgMBj8zn9UPaslZi8iCP59x KNVsTrmRrAIijOZa26lMu+rjZY5L0V8eBwlUqLeG/oUPW+nfa9Rv8aWYWBlqDKmt IVruyGykEgfYwHERq3OOJsDfRkyUmGzzV0iSfs3JMR+9Ddr+CjUnOKwgNjqd8nRr mSKiOrICC6Y6rYeHMBWH+q8gdle+1Ee01/nUv7ZHIz3gzntLsSIMwcAFSPS4UTx3 mC4yMe2XYA9tviiHYLCxGQ6vYTgNvfStGDtz4hnK5xzhuCsCVuTnsjGxCetJiBe+ td0sr+DXyX7C7XupzNv/K3gW225AaP6zAQhhoc7weM5eIUs+npDFxpDfvRts5KOT NNsM/4WmUK49tnx71Vc8z5q/W5IWCIA2cCY/zdVgdH6KTwx5gQakByivSUX9WHrL xwR8AuoWNpxEfKW3eiBI =H9jC -----END PGP SIGNATURE----- --KN5l+BnMqAQyZLvT--