Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933085AbcCIP2i (ORCPT ); Wed, 9 Mar 2016 10:28:38 -0500 Received: from down.free-electrons.com ([37.187.137.238]:46517 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933012AbcCIP2Z (ORCPT ); Wed, 9 Mar 2016 10:28:25 -0500 Date: Wed, 9 Mar 2016 16:28:22 +0100 From: Maxime Ripard To: Hans de Goede Cc: Linus Walleij , Alexandre Courbot , Lee Jones , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH 0/4] Add AXP209 GPIO driver Message-ID: <20160309152822.GQ8418@lukather> References: <1457520614-32239-1-git-send-email-maxime.ripard@free-electrons.com> <56E0146E.6050102@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0kFaR1LGCHUiJxSD" Content-Disposition: inline In-Reply-To: <56E0146E.6050102@redhat.com> 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 Content-Length: 2864 Lines: 77 --0kFaR1LGCHUiJxSD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Mar 09, 2016 at 01:17:50PM +0100, Hans de Goede wrote: > Hi, >=20 > On 09-03-16 11:50, Maxime Ripard wrote: > >Hi, > > > >The axp209 PMIC used in combination to some Allwinner SoCs has a bunch > >of GPIOs accessible. Some boards use these to control their backlight > >or a few LEDs. >=20 > Thanks for working on this, but IMHO this cannot go upstream like this, > the gpio pins on the axp pmics need a pinctrl driver, not a gpio > driver. I.E. on the axp209 gpio0 and gpio1 can also be used to output > an additional low-noise ldo (so as a regulator), or as an adc input. Eventually, yes, it needs both. But they don't even have to be the same driver, since they provide two different features. The only reason we have that construct in the pio case is because they share the same address space, but in the AXP case, the regmap and our mfd take care of that already. > I've been working on gsl1680 touchscreen support lately and on at least > a few a23 tablets, the low-noise ldo is used as AVCC for the touchscreen > controller. Yeah, the AXP209 also has an ADC connected to these pins. > Now these use an axp223 pmic, but nothing is stopping someone from > doing something similar with an axp209 and I think it would be best > to support this from day one, rather then hope we can retro-fit this > later without breaking dts. I considered that, but I don't see how it would break the DT later. If someone wants to enable say the ADC, he will of course have to add the pinctrl driver, and the pinctrl handles, but the old DT will only reference the gpio driver directly, which would still be something that would work. Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --0kFaR1LGCHUiJxSD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJW4EEWAAoJEBx+YmzsjxAg5tsP/R+ciz86KSJ6KSown2t1Ducl 5JZf3ScGASW7XSWX0O2F4DypVaM58b0nK3zFLVzdWIu/ntFJfVNO1pv75/JxuXZB MlF/YyJ1Kw5u7r1wOds3Pn8PIrExwDJQQtiLEko06rTCp42vIEY4145IR/Qk3t0V b81JOYFS3wB9LdcPKw9Mx5fSF2uBD6k4cA4r6UwEgR/bvmScey3SlsOQlKYZ/MqI Dcup97jZjIrLeFoM8j3THF1WxK5xtQvLg0mgJf2OHcpcA+fFIM7bANY3RnznR7p2 dXcyEg5OmeOjuaO6w31tNH/CzFHfleXPFSGQFmlWrp5b3pTFiZKpylxVnzUxrB7A VoFkrwGwGHds2vRbR931RB+K+CJEb92tOYMeN80FW4hLfvN4nAq33GYee7qxQf8V uTluNHg3+p9mACLH5VuzayO+27IhvMk45k4rel4GbjqwrM1mUhJpWJ3QC7KjkZfs CV9+7K3cP+ICrPM5iKlf43WQFOO7Gsy5UoJ7A3joWDoew7qq/nzQujOChtM4e3KV 1fIfIVKyzYq9yK+b0aNmBUt2zuHQI4j0pAqscEcBhhEgt0/11YRFcfqM2RGtZUAz AYWTtPnZgk8/kTENyTf3bM+/7wYoJKmL749HLf46WiO648fePjj/8LbKlMsmrAZ1 2KjEEIdRuoa0Z51twgEe =X79t -----END PGP SIGNATURE----- --0kFaR1LGCHUiJxSD--