From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752685AbcDQM3k (ORCPT ); Sun, 17 Apr 2016 08:29:40 -0400 Received: from mail.kernel.org ([198.145.29.136]:53833 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474AbcDQM3i (ORCPT ); Sun, 17 Apr 2016 08:29:38 -0400 Date: Sun, 17 Apr 2016 14:29:33 +0200 From: Sebastian Reichel To: Ivaylo Dimitrov Cc: tony@atomide.com, bcousson@baylibre.com, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, linux@arm.linux.org.uk, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: dts: omap3-n900: Specify peripherals LDO regulators initial mode Message-ID: <20160417122933.GA8093@earth> References: <1460788643-18590-1-git-send-email-ivo.g.dimitrov.75@gmail.com> <20160417000536.GA1124@earth> <571329B0.9060503@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="a8Wt8u1KmwUX3Y2C" Content-Disposition: inline In-Reply-To: <571329B0.9060503@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sun, Apr 17, 2016 at 09:14:08AM +0300, Ivaylo Dimitrov wrote: > On 17.04.2016 03:05, Sebastian Reichel wrote: > >On Sat, Apr 16, 2016 at 09:37:23AM +0300, Ivaylo Dimitrov wrote: > >>Without that, regulators are left in the mode last set by the bootloade= r or > >>by the kernel the device was rebooted from. This leads to various probl= ems > >>like non-working peripherals. > >> > >>Signed-off-by: Ivaylo Dimitrov > >>--- > >> arch/arm/boot/dts/omap3-n900.dts | 9 +++++++++ > >> 1 file changed, 9 insertions(+) > >> > >>diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3= -n900.dts > >>index b3c26a9..1bb36e2 100644 > >>--- a/arch/arm/boot/dts/omap3-n900.dts > >>+++ b/arch/arm/boot/dts/omap3-n900.dts > >>@@ -329,6 +329,7 @@ > >> regulator-name =3D "V28"; > >> regulator-min-microvolt =3D <2800000>; > >> regulator-max-microvolt =3D <2800000>; > >>+ regulator-initial-mode =3D <0x0e>; > >> regulator-always-on; /* due to battery cover sensor */ > >> }; > > > >I think this should either get an additional > >comment like /* MODE_NORMAL */ or implemented >=20 > According to the TRM, this is 'ACTIVE state', but that does not fit in the > regulator framework terminology. No problem with using STATE_ACTIVE or any other fitting description. IMHO that "active" is misleading for regulators without "always-on/boot-on" tag, but that was TI's decision. > >using a define and a TWL4030_REGULATOR_MODE_NORMAL > >constant to keep the *.dts easily readable. >=20 > We already have RES_STATE_ACTIVE defined in linux/i2c/twl.h, is there a w= ay > to include that in a dts? Not in its current state. During kernel build the C preprocessor is applied on the *.dts files. So the header may only contain preprocessor macros (e.g. #define). For that solution something like ~/src/linux/include/dt-bindings/regulator/maxim,max77802.h should be created for the twl regulator. -- Sebastian --a8Wt8u1KmwUX3Y2C Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJXE4GqAAoJENju1/PIO/qac/0QAJjwkTcJ+wdkaq+lUQVZtJo9 i5mwA2DcOFiGwt8/VpUyFYloDUyJjY2bx84FYKfJQaoQBKuOuPqpyYB/nl/RoMwb PCOKS/JL7Q5707vOKWPgkYFLGOHxdVc4YUa2GN6TaTbklOZXp4t6VoX6mHoDXkRT URlC2imytAMJVWzxvpVBwZjKPxhmmVntuzcr88p6+5qei8ogLFUS0IsKguLkVZ8z PM2RXT5kSE/Q88KUEyjtdmJC6WSdbgIyWfTYRQwSoLg054L94soTCMXZuwESDqkM AAyNXlfZfD6gJ/pamWR4rJm3AKen81UaUvc2gw257Rq91JK/NyXA9Xbd+htpEM3x tMf4RSnc3ERYHAe7q0l38j57kJZyTNWi0/NaJ1LPVfIj6dg0IJHX01q8W7m9B7D7 2Q40FY/NncbqjL423OXbaZybnP8rLpMQ9GpUFctsH+oLvQoIt5Y/EL7xHplG4QVH JW19oPB1OITiSXSSSqGub6Cb3UlP2itllEz0l6Ucs0w1q4V4SWCS0gNCtg7mZGXJ GRMz8LcviiDhA6wdad9NVSVIkX4nRQSk13H59vnTpHeb3FIIsw10K1FzUkPDJWy1 wTnx0DU+gJatGw3LozeEme6uYZs7NhiUVtsWgK1xlTWT7qylhiMKs/yZHm0QjX/M BAPogWHFL49MK5rPXZnP =nOs9 -----END PGP SIGNATURE----- --a8Wt8u1KmwUX3Y2C--