Thread (17 messages) 17 messages, 6 authors, 2016-02-08

[PATCH V4 2/2] regulator: mt6323: Add support for MT6323 regulator

From: broonie@kernel.org (Mark Brown)
Date: 2016-01-27 14:41:21
Also in: linux-mediatek, lkml

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.  

The comment is also inaccurate, it claims it's imposing constraints but
in fact it's adding additional permissions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160127/b6e35868/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help