From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752047AbdJCOrm (ORCPT ); Tue, 3 Oct 2017 10:47:42 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:58772 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751501AbdJCOrk (ORCPT ); Tue, 3 Oct 2017 10:47:40 -0400 Date: Tue, 3 Oct 2017 16:47:37 +0200 From: Maxime Ripard To: Linus Walleij Cc: Quentin Schulz , Mark Brown , Rob Herring , Mark Rutland , Chen-Yu Tsai , Russell King , Lee Jones , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Thomas Petazzoni , linux-sunxi Subject: Re: [PATCH v3 12/12] ARM: dtsi: axp81x: set pinmux for GPIO0/1 when used as LDOs Message-ID: <20171003144737.rhgtp3uwckhvoqdw@flea> References: <20171002120854.5212-1-quentin.schulz@free-electrons.com> <20171002120854.5212-13-quentin.schulz@free-electrons.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7j55ewpdbwxu4oy3" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170914 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --7j55ewpdbwxu4oy3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Linus, On Tue, Oct 03, 2017 at 09:27:17AM +0000, Linus Walleij wrote: > On Mon, Oct 2, 2017 at 2:08 PM, Quentin Schulz > wrote: >=20 > > On AXP813/818, GPIO0 and GPIO1 can be used as LDO as (respectively) > > ldo_io0 and ldo_io1. > (...) > > + gpio0_ldo: gpio0_ldo { > > + pins =3D "GPIO0"; > > + function =3D "ldo"; > > + }; > (...) > > + pinctrl-names =3D "default"; > > + pinctrl-0 =3D <&gpio0_ldo>; > > /* Disable by default to avoid conflicts with G= PIO */ > > status =3D "disabled"; >=20 > So this is still by default disabled, but you make the default > mode something called "ldo". >=20 > And I think that is to be understood as a low-dropout regulator? >=20 > So is the idea that this should be represented as a regulator > in the end? >=20 > Then I think the state name should not be "default" rather > something like "regulator" and "default" should be the GPIO > mode, as I guess something like that exists. >=20 > Activating a regulator using pin control "default" mode is > not very pretty. It would probably be unintuitive and end > up wasting power because people will get confused about > what is going on. That's not really it. The PMIC has pins that can be muxed either to (regular) GPIOs, an ADC or to an LDO regulator. This is just muxing, the regulator will be enabled and disabled separately through another register. If it wasn't the case, it would indeed be very messy. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --7j55ewpdbwxu4oy3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJZ06MJAAoJEBx+YmzsjxAgYXsP/jrsyGL2aXyBEOVdyQFXVrYG EcHgUQLAC8tWJ+b1y8MxkB89elEtOlvBDS2sTqa/ygISpkhy3LMPeQgnwsmm6B1M N2TNqVj6rAtPbMF3D95Uv4x2sMmVnGBdGANrgdkg7tBMLktA3H6f00ngI40tXsKm SiBzeGQBgC+cf2H7YkzrAotC6D6QHIVhjhLcQ6vjFjdY1+rIjUWxVGhIsyjzUIZt RlEauzheMlOwXa64C8Kzxd8tX+pZWSWDI6xi1kaV1fIjM34qBiWDjoraYlt8gMIm Zntazu7CeuhPKH94re4gRPw91KQ38mVfIlo9O56G73Lv62qpJ3yXB0m4LG5bpiTS OYIW8KlOshEeWlndPVQsl5hrB13TQL2wyX9bVZt+g0SXo9pnfFHCdKcm6bzwSOnS sNdrr9l+xmZ3v1EGlqjJZwu4Ih8X+FvzyXGRD4SlUhmECguDlMy37jhADj3Tgufs tjJaIiOKXcDZ7DzN9YHCIUYZK1icstKpqVqrj5buBt/G9Hi/+QyH9nX3qY+h1aGm k7OFixlZ0lCDZllP9nMUlUeJG4MsqNCmLFIMAmPW8uTY/MxP7TK44HxsoUYOqgXg MsZ+pWTSSHIwsYUI/qCfz8C7jkzaOY22cpc5ezr3gPkePNxKrnEzFXMDhycYRbAG 34L7OSLaF958BAL77dhm =pAks -----END PGP SIGNATURE----- --7j55ewpdbwxu4oy3--