devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Ivaylo Dimitrov
	<ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
	bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] ARM: dts: omap3-n900: Specify peripherals LDO regulators initial mode
Date: Sun, 17 Apr 2016 14:29:33 +0200	[thread overview]
Message-ID: <20160417122933.GA8093@earth> (raw)
In-Reply-To: <571329B0.9060503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]

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 bootloader or
> >>by the kernel the device was rebooted from. This leads to various problems
> >>like non-working peripherals.
> >>
> >>Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >>---
> >>  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.

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.
> 
> We already have RES_STATE_ACTIVE defined in linux/i2c/twl.h, is there a way
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-04-17 12:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-16  6:37 [PATCH] ARM: dts: omap3-n900: Specify peripherals LDO regulators initial mode Ivaylo Dimitrov
2016-04-17  0:05 ` Sebastian Reichel
2016-04-17  6:14   ` Ivaylo Dimitrov
     [not found]     ` <571329B0.9060503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-17 12:29       ` Sebastian Reichel [this message]
2016-04-17 14:29         ` [PATCH v1] " Ivaylo Dimitrov
2016-04-18  5:11           ` Sebastian Reichel
     [not found]           ` <1460903363-2197-1-git-send-email-ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-19 21:18             ` Javier Martinez Canillas
2016-04-24 10:08           ` Pavel Machek
2016-04-26 17:14             ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160417122933.GA8093@earth \
    --to=sre-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).