All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Henry Chen <henryc.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Matthias Brugger
	<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Bjorn Andersson
	<bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>,
	Laxman Dewangan
	<ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH RESEND 1/2] regulator: Add support for parsing operation mode
Date: Wed, 11 May 2016 15:46:32 +0100	[thread overview]
Message-ID: <20160511144632.GH6261@sirena.org.uk> (raw)
In-Reply-To: <1462959090-2877-2-git-send-email-henryc.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>

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

On Wed, May 11, 2016 at 05:31:29PM +0800, Henry Chen wrote:

> +- regulator-allow-change-mode: allow the regulator mode to be configured
> +- regulator-supported-modes: Regulators can run in a variety of different operating
> +  modes depending on output load. This allows further system power savings by
> +  selecting the best (and most efficient) regulator mode for a desired load.
> +  The definition for each of these operation is defined at
> +  include/linux/regulator/consumer.h

It really isn't OK for a DT binding to be documented by referencing
Linux kernel internals.

> +	0: FAST.
> +	1: NORMAL.
> +	2: IDLE.
> +	3: STANDBY.

The problem with these is that they don't really mean anything outside
of a specific regulator.  This makes it very hard to make them at all
interoperable, and is also incompatible with the way we're currently
handling the modes elsewhere in the bindings.  If we're going to make an
ABI of this we need to have something with abstraction in it but it's
hard to see how to abstract modes since they're so implementation
specific, even if the mechanisms are similar the different load ranges
that regulators support mean that what's a very taxing load for one
regulator may be nothing to another.

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

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Henry Chen <henryc.chen@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH RESEND 1/2] regulator: Add support for parsing operation mode
Date: Wed, 11 May 2016 15:46:32 +0100	[thread overview]
Message-ID: <20160511144632.GH6261@sirena.org.uk> (raw)
In-Reply-To: <1462959090-2877-2-git-send-email-henryc.chen@mediatek.com>

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

On Wed, May 11, 2016 at 05:31:29PM +0800, Henry Chen wrote:

> +- regulator-allow-change-mode: allow the regulator mode to be configured
> +- regulator-supported-modes: Regulators can run in a variety of different operating
> +  modes depending on output load. This allows further system power savings by
> +  selecting the best (and most efficient) regulator mode for a desired load.
> +  The definition for each of these operation is defined at
> +  include/linux/regulator/consumer.h

It really isn't OK for a DT binding to be documented by referencing
Linux kernel internals.

> +	0: FAST.
> +	1: NORMAL.
> +	2: IDLE.
> +	3: STANDBY.

The problem with these is that they don't really mean anything outside
of a specific regulator.  This makes it very hard to make them at all
interoperable, and is also incompatible with the way we're currently
handling the modes elsewhere in the bindings.  If we're going to make an
ABI of this we need to have something with abstraction in it but it's
hard to see how to abstract modes since they're so implementation
specific, even if the mechanisms are similar the different load ranges
that regulators support mean that what's a very taxing load for one
regulator may be nothing to another.

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

  parent reply	other threads:[~2016-05-11 14:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11  9:31 Add support for regulator operation mode of mt6397 Henry Chen
2016-05-11  9:31 ` Henry Chen
2016-05-11  9:31 ` Henry Chen
2016-05-11  9:31 ` [PATCH RESEND 1/2] regulator: Add support for parsing operation mode Henry Chen
2016-05-11  9:31   ` Henry Chen
2016-05-11  9:31   ` Henry Chen
     [not found]   ` <1462959090-2877-2-git-send-email-henryc.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2016-05-11 14:46     ` Mark Brown [this message]
2016-05-11 14:46       ` Mark Brown
     [not found] ` <1462959090-2877-1-git-send-email-henryc.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2016-05-11  9:31   ` [PATCH RESEND 2/2] regulator: mt6397: Add buck change mode regulator interface for mt6397 Henry Chen
2016-05-11  9:31     ` Henry Chen
2016-05-11  9:31     ` Henry Chen
2016-05-11 14:50     ` Mark Brown
     [not found]       ` <20160511145046.GI6261-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-05-13  8:04         ` Henry Chen
2016-05-13  8:04           ` Henry Chen
2016-05-13  8:04           ` Henry Chen

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=20160511144632.GH6261@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=henryc.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.