All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henry Chen <henryc.chen@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Chen Zhong <chen.zhong@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH V4 2/2] regulator: mt6323: Add support for MT6323 regulator
Date: Thu, 28 Jan 2016 15:16:41 +0800	[thread overview]
Message-ID: <1453965401.19407.18.camel@mtksdaap41> (raw)
In-Reply-To: <20160127144105.GQ6042@sirena.org.uk>

Hi Mark,

On Wed, 2016-01-27 at 14:41 +0000, Mark Brown wrote:
> On Wed, Jan 27, 2016 at 01:00:59PM +0100, John Crispin wrote:
> 
> > +		/* Constrain board-specific capabilities according to what
> > +		 * this driver and the chip itself can actually do.
> > +		 */
> > +		c = rdev->constraints;
> > +		c->valid_modes_mask |= REGULATOR_MODE_NORMAL |
> > +				       REGULATOR_MODE_STANDBY;
> > +		c->valid_ops_mask |= REGULATOR_CHANGE_MODE;
> 
> No, drivers should *never* enable things that weren't explictly enabled
> by the machine constraints.  This misses the whole point of having
> constraints.  They are there so that the system integrator can enable
> the functionality that is safe on a given board.  

Okay..the constrains should be define on device tree.
But which optional properties was suitable to fill on device tree if consumers want to call
regulator_set_mode directly ?
I have check the of_regulator.c and not found the suitable property name which can set valid_modes_mask & valid_ops_mask.

Thanks,
Henry 
> 
> The comment is also inaccurate, it claims it's imposing constraints but
> in fact it's adding additional permissions.
> _______________________________________________
> 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: henryc.chen@mediatek.com (Henry Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4 2/2] regulator: mt6323: Add support for MT6323 regulator
Date: Thu, 28 Jan 2016 15:16:41 +0800	[thread overview]
Message-ID: <1453965401.19407.18.camel@mtksdaap41> (raw)
In-Reply-To: <20160127144105.GQ6042@sirena.org.uk>

Hi Mark,

On Wed, 2016-01-27 at 14:41 +0000, Mark Brown wrote:
> On Wed, Jan 27, 2016 at 01:00:59PM +0100, John Crispin wrote:
> 
> > +		/* Constrain board-specific capabilities according to what
> > +		 * this driver and the chip itself can actually do.
> > +		 */
> > +		c = rdev->constraints;
> > +		c->valid_modes_mask |= REGULATOR_MODE_NORMAL |
> > +				       REGULATOR_MODE_STANDBY;
> > +		c->valid_ops_mask |= REGULATOR_CHANGE_MODE;
> 
> No, drivers should *never* enable things that weren't explictly enabled
> by the machine constraints.  This misses the whole point of having
> constraints.  They are there so that the system integrator can enable
> the functionality that is safe on a given board.  

Okay..the constrains should be define on device tree.
But which optional properties was suitable to fill on device tree if consumers want to call
regulator_set_mode directly ?
I have check the of_regulator.c and not found the suitable property name which can set valid_modes_mask & valid_ops_mask.

Thanks,
Henry 
> 
> The comment is also inaccurate, it claims it's imposing constraints but
> in fact it's adding additional permissions.
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Henry Chen <henryc.chen@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: John Crispin <blogic@openwrt.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	Chen Zhong <chen.zhong@mediatek.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH V4 2/2] regulator: mt6323: Add support for MT6323 regulator
Date: Thu, 28 Jan 2016 15:16:41 +0800	[thread overview]
Message-ID: <1453965401.19407.18.camel@mtksdaap41> (raw)
In-Reply-To: <20160127144105.GQ6042@sirena.org.uk>

Hi Mark,

On Wed, 2016-01-27 at 14:41 +0000, Mark Brown wrote:
> On Wed, Jan 27, 2016 at 01:00:59PM +0100, John Crispin wrote:
> 
> > +		/* Constrain board-specific capabilities according to what
> > +		 * this driver and the chip itself can actually do.
> > +		 */
> > +		c = rdev->constraints;
> > +		c->valid_modes_mask |= REGULATOR_MODE_NORMAL |
> > +				       REGULATOR_MODE_STANDBY;
> > +		c->valid_ops_mask |= REGULATOR_CHANGE_MODE;
> 
> No, drivers should *never* enable things that weren't explictly enabled
> by the machine constraints.  This misses the whole point of having
> constraints.  They are there so that the system integrator can enable
> the functionality that is safe on a given board.  

Okay..the constrains should be define on device tree.
But which optional properties was suitable to fill on device tree if consumers want to call
regulator_set_mode directly ?
I have check the of_regulator.c and not found the suitable property name which can set valid_modes_mask & valid_ops_mask.

Thanks,
Henry 
> 
> The comment is also inaccurate, it claims it's imposing constraints but
> in fact it's adding additional permissions.
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2016-01-28  7:16 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 12:00 [PATCH V4 1/2] regulator: Add document for MT6323 regulator John Crispin
2016-01-27 12:00 ` John Crispin
2016-01-27 12:00 ` John Crispin
2016-01-27 12:00 ` [PATCH V4 2/2] regulator: mt6323: Add support " John Crispin
2016-01-27 12:00   ` John Crispin
2016-01-27 14:41   ` Mark Brown
2016-01-27 14:41     ` Mark Brown
2016-01-28  7:16     ` Henry Chen [this message]
2016-01-28  7:16       ` Henry Chen
2016-01-28  7:16       ` Henry Chen
2016-01-28 11:38       ` Mark Brown
2016-01-28 11:38         ` Mark Brown
     [not found]     ` <20160127144105.GQ6042-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-01-28 18:13       ` John Crispin
2016-01-28 18:13         ` John Crispin
2016-01-28 18:13         ` John Crispin
2016-01-28 23:13         ` Mark Brown
2016-01-28 23:13           ` Mark Brown
2016-01-29  9:52           ` menghui lin
2016-01-29  9:52             ` menghui lin
2016-01-29 11:27             ` Mark Brown
2016-01-29 11:27               ` Mark Brown
2016-01-29 12:11               ` menghui lin
2016-01-29 12:11                 ` menghui lin
2016-02-02 19:38                 ` Mark Brown
2016-02-02 19:38                   ` Mark Brown
2016-02-03  5:39                   ` menghui lin
2016-02-03  5:39                     ` menghui lin
2016-02-03 12:29                     ` Mark Brown
2016-02-03 12:29                       ` Mark Brown
2016-02-04  2:42                       ` menghui lin
2016-02-04  2:42                         ` menghui lin
2016-02-02 19:39                 ` Mark Brown
2016-02-02 19:39                   ` Mark Brown
2016-02-08 12:14   ` kbuild test robot
2016-02-08 12:14     ` kbuild test robot
2016-02-08 12:14     ` kbuild test robot
2016-02-01 15:40 ` [PATCH V4 1/2] regulator: Add document " Rob Herring
2016-02-01 15:40   ` Rob Herring

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=1453965401.19407.18.camel@mtksdaap41 \
    --to=henryc.chen@mediatek.com \
    --cc=blogic@openwrt.org \
    --cc=broonie@kernel.org \
    --cc=chen.zhong@mediatek.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    /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.