All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fan Chen <fan.chen@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>, <devicetree@vger.kernel.org>,
	"Pawel Moll" <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Henry Chen <henryc.chen@mediatek.com>,
	<linux-kernel@vger.kernel.org>, Rob Herring <robh+dt@kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	Kumar Gala <galak@codeaurora.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 1/3] regulator: DT: Add DT property for operation mode configuration
Date: Tue, 31 May 2016 16:20:35 +0800	[thread overview]
Message-ID: <1464682835.25847.3.camel@mtksdaap41> (raw)
In-Reply-To: <20160523112856.GR8206@sirena.org.uk>

Hi Mark,

On Mon, 2016-05-23 at 12:28 +0100, Mark Brown wrote:
> On Mon, May 23, 2016 at 11:47:04AM +0100, Mark Rutland wrote:
> 
> > > +/* Regulator operating modes */
> > > +#define REGULATOR_OPERATION_MODE_FAST			0x0
> > > +#define REGULATOR_OPERATION_MODE_NORMAL			0x1
> > > +#define REGULATOR_OPERATION_MODE_IDLE			0x2
> > > +#define REGULATOR_OPERATION_MODE_STANDBY		0x3
> 
> > These sound like they're tied to linux internal details (e.g. the
> > implementation of idle and/or suspend).
> 
> > What do each of these actually mean?
> 
> They are not really at all general and I'm fairly sure I've provided the
> same feedback repeatedly on earlier versions of the patch set.  They are
> not entirely based on Linux internal details (or at least the Linux
> internal details tend to flow from the hardware) - broadly fast is
> forced PWM, normal is default, idle is LDO mode and standby is a lower
> quality LDO mode - but how this translates into anything that a consumer
> could actually use is unclear since the supported output loads and
> quality of regulation can vary wildy.  It's also somewhat implementation
> dependent what a given regulator does (and it's always possible that
> some regulators may have more modes to control or differing definitions
> in the hardware).
> 
> Henry, *please* look at how the existing mode support in the bindings is
> done and consider how a consumer would use this given that it doesn't
> know anything about the regulator...

Hi Mark,

Thanks for your review and patiently explain your thought to us.

In the case of svs[1], which Henry mentioned in cover letter, it can be
regarded as a special consumer who requires very accurate voltage for
calibration the hardware in its initialization stage. So, this kinds of
consumers know their regulator very well and only need to switch to the
modes they want in the particular conditions.
However, IIUC, you want a proposal to provide a sort of QoS framework
which can cover most of use cases who care about the regular quality in
runtime, is that correct?

IMHO, some quality index can be considered, for example:
Minimum Current Requirement (mA): If a user specified this constraint in
runtime, it means that he cares more about the supplying quality like
transient voltage drop, ripple above certain load.
Maximum Current Requirement (mA): If a user specified this constraint in
runtime, it means that he cares more about the power consumption under
certain load.
It could be a flexible way instead to tie the operation modes directly.

BTW, we should encourage people here to share more use cases related to
regulator quality issues, especially in runtime, so we can evaluate the
most suitable index to fit the requirements.

What do you think?


[1] http://www.spinics.net/lists/devicetree/msg111208.html


Best regards,
Fan

> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Fan Chen <fan.chen@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, Pawel Moll <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Henry Chen <henryc.chen@mediatek.com>,
	linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Kumar Gala <galak@codeaurora.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/3] regulator: DT: Add DT property for operation mode configuration
Date: Tue, 31 May 2016 16:20:35 +0800	[thread overview]
Message-ID: <1464682835.25847.3.camel@mtksdaap41> (raw)
In-Reply-To: <20160523112856.GR8206@sirena.org.uk>

Hi Mark,

On Mon, 2016-05-23 at 12:28 +0100, Mark Brown wrote:
> On Mon, May 23, 2016 at 11:47:04AM +0100, Mark Rutland wrote:
> 
> > > +/* Regulator operating modes */
> > > +#define REGULATOR_OPERATION_MODE_FAST			0x0
> > > +#define REGULATOR_OPERATION_MODE_NORMAL			0x1
> > > +#define REGULATOR_OPERATION_MODE_IDLE			0x2
> > > +#define REGULATOR_OPERATION_MODE_STANDBY		0x3
> 
> > These sound like they're tied to linux internal details (e.g. the
> > implementation of idle and/or suspend).
> 
> > What do each of these actually mean?
> 
> They are not really at all general and I'm fairly sure I've provided the
> same feedback repeatedly on earlier versions of the patch set.  They are
> not entirely based on Linux internal details (or at least the Linux
> internal details tend to flow from the hardware) - broadly fast is
> forced PWM, normal is default, idle is LDO mode and standby is a lower
> quality LDO mode - but how this translates into anything that a consumer
> could actually use is unclear since the supported output loads and
> quality of regulation can vary wildy.  It's also somewhat implementation
> dependent what a given regulator does (and it's always possible that
> some regulators may have more modes to control or differing definitions
> in the hardware).
> 
> Henry, *please* look at how the existing mode support in the bindings is
> done and consider how a consumer would use this given that it doesn't
> know anything about the regulator...

Hi Mark,

Thanks for your review and patiently explain your thought to us.

In the case of svs[1], which Henry mentioned in cover letter, it can be
regarded as a special consumer who requires very accurate voltage for
calibration the hardware in its initialization stage. So, this kinds of
consumers know their regulator very well and only need to switch to the
modes they want in the particular conditions.
However, IIUC, you want a proposal to provide a sort of QoS framework
which can cover most of use cases who care about the regular quality in
runtime, is that correct?

IMHO, some quality index can be considered, for example:
Minimum Current Requirement (mA): If a user specified this constraint in
runtime, it means that he cares more about the supplying quality like
transient voltage drop, ripple above certain load.
Maximum Current Requirement (mA): If a user specified this constraint in
runtime, it means that he cares more about the power consumption under
certain load.
It could be a flexible way instead to tie the operation modes directly.

BTW, we should encourage people here to share more use cases related to
regulator quality issues, especially in runtime, so we can evaluate the
most suitable index to fit the requirements.

What do you think?


[1] http://www.spinics.net/lists/devicetree/msg111208.html


Best regards,
Fan

> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: fan.chen@mediatek.com (Fan Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] regulator: DT: Add DT property for operation mode configuration
Date: Tue, 31 May 2016 16:20:35 +0800	[thread overview]
Message-ID: <1464682835.25847.3.camel@mtksdaap41> (raw)
In-Reply-To: <20160523112856.GR8206@sirena.org.uk>

Hi Mark,

On Mon, 2016-05-23 at 12:28 +0100, Mark Brown wrote:
> On Mon, May 23, 2016 at 11:47:04AM +0100, Mark Rutland wrote:
> 
> > > +/* Regulator operating modes */
> > > +#define REGULATOR_OPERATION_MODE_FAST			0x0
> > > +#define REGULATOR_OPERATION_MODE_NORMAL			0x1
> > > +#define REGULATOR_OPERATION_MODE_IDLE			0x2
> > > +#define REGULATOR_OPERATION_MODE_STANDBY		0x3
> 
> > These sound like they're tied to linux internal details (e.g. the
> > implementation of idle and/or suspend).
> 
> > What do each of these actually mean?
> 
> They are not really at all general and I'm fairly sure I've provided the
> same feedback repeatedly on earlier versions of the patch set.  They are
> not entirely based on Linux internal details (or at least the Linux
> internal details tend to flow from the hardware) - broadly fast is
> forced PWM, normal is default, idle is LDO mode and standby is a lower
> quality LDO mode - but how this translates into anything that a consumer
> could actually use is unclear since the supported output loads and
> quality of regulation can vary wildy.  It's also somewhat implementation
> dependent what a given regulator does (and it's always possible that
> some regulators may have more modes to control or differing definitions
> in the hardware).
> 
> Henry, *please* look at how the existing mode support in the bindings is
> done and consider how a consumer would use this given that it doesn't
> know anything about the regulator...

Hi Mark,

Thanks for your review and patiently explain your thought to us.

In the case of svs[1], which Henry mentioned in cover letter, it can be
regarded as a special consumer who requires very accurate voltage for
calibration the hardware in its initialization stage. So, this kinds of
consumers know their regulator very well and only need to switch to the
modes they want in the particular conditions.
However, IIUC, you want a proposal to provide a sort of QoS framework
which can cover most of use cases who care about the regular quality in
runtime, is that correct?

IMHO, some quality index can be considered, for example:
Minimum Current Requirement (mA): If a user specified this constraint in
runtime, it means that he cares more about the supplying quality like
transient voltage drop, ripple above certain load.
Maximum Current Requirement (mA): If a user specified this constraint in
runtime, it means that he cares more about the power consumption under
certain load.
It could be a flexible way instead to tie the operation modes directly.

BTW, we should encourage people here to share more use cases related to
regulator quality issues, especially in runtime, so we can evaluate the
most suitable index to fit the requirements.

What do you think?


[1] http://www.spinics.net/lists/devicetree/msg111208.html


Best regards,
Fan

> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2016-05-31  8:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23  7:13 Add support for regulator operation mode of mt6397 Henry Chen
2016-05-23  7:13 ` Henry Chen
2016-05-23  7:13 ` Henry Chen
2016-05-23  7:13 ` [PATCH v2 1/3] regulator: DT: Add DT property for operation mode configuration Henry Chen
2016-05-23  7:13   ` Henry Chen
2016-05-23  7:13   ` Henry Chen
2016-05-23 10:47   ` Mark Rutland
2016-05-23 10:47     ` Mark Rutland
2016-05-23 11:28     ` Mark Brown
2016-05-23 11:28       ` Mark Brown
2016-05-31  8:20       ` Fan Chen [this message]
2016-05-31  8:20         ` Fan Chen
2016-05-31  8:20         ` Fan Chen
2016-06-03  0:16         ` Mark Brown
2016-06-03  0:16           ` Mark Brown
2016-06-03  0:16           ` Mark Brown
2016-06-03  5:42           ` Fan Chen
2016-06-03  5:42             ` Fan Chen
2016-06-03  5:42             ` Fan Chen
2016-05-23  7:13 ` [PATCH v2 2/3] regulator: of: Add support for parsing operation mode Henry Chen
2016-05-23  7:13   ` Henry Chen
2016-05-23  7:13   ` Henry Chen
2016-05-23  7:13 ` [PATCH v2 3/3] regulator: mt6397: Add buck change mode regulator interface for mt6397 Henry Chen
2016-05-23  7:13   ` Henry Chen
2016-05-23  7:13   ` Henry Chen
2016-05-23 11:29   ` Mark Brown
2016-05-23 11:29     ` Mark Brown
2016-05-23 17:50   ` Applied "regulator: mt6397: Add buck change mode regulator interface for mt6397" to the regulator tree Mark Brown
2016-05-23 17:50     ` Mark Brown
2016-05-23 17:50     ` Mark Brown

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=1464682835.25847.3.camel@mtksdaap41 \
    --to=fan.chen@mediatek.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=henryc.chen@mediatek.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.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.