Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752089AbcDQGOQ (ORCPT ); Sun, 17 Apr 2016 02:14:16 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34978 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751429AbcDQGOP (ORCPT ); Sun, 17 Apr 2016 02:14:15 -0400 Subject: Re: [PATCH] ARM: dts: omap3-n900: Specify peripherals LDO regulators initial mode To: Sebastian Reichel References: <1460788643-18590-1-git-send-email-ivo.g.dimitrov.75@gmail.com> <20160417000536.GA1124@earth> 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 From: Ivaylo Dimitrov Message-ID: <571329B0.9060503@gmail.com> Date: Sun, 17 Apr 2016 09:14:08 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160417000536.GA1124@earth> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1346 Lines: 40 On 17.04.2016 03:05, Sebastian Reichel wrote: > Hi Ivo, > > 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 bootloader or >> by the kernel the device was rebooted from. This leads to various problems >> 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 = "V28"; >> regulator-min-microvolt = <2800000>; >> regulator-max-microvolt = <2800000>; >> + regulator-initial-mode = <0x0e>; >> regulator-always-on; /* due to battery cover sensor */ >> }; > > I think this should either get an additional > comment like /* MODE_NORMAL */ or implemented According to the TRM, this is 'ACTIVE state', but that does not fit in the regulator framework terminology. > using a define and a TWL4030_REGULATOR_MODE_NORMAL > constant to keep the *.dts easily readable. We already have RES_STATE_ACTIVE defined in linux/i2c/twl.h, is there a way to include that in a dts? Ivo