Re: [PATCHv2] Regulator: Add Anatop regulator driver

From: Mark Brown
Date: Sat Dec 24 2011 - 07:37:42 EST


On Thu, Dec 22, 2011 at 11:33:38AM +0000, Mark Brown wrote:
> On Wed, Dec 21, 2011 at 05:03:31PM +0800, Ying-Chun Liu (PaulLiu) wrote:

> > + if (anatop_reg->rdata->control_reg) {
> > + val = anatop_reg->rdata->min_bit_val +
> > + (uv - reg->constraints->min_uV) / 25000;

> You're not checking that the resulting voltage matches the constraints
> or updating selector.

Also on re-reading this looks *very* broken - you're using the
constraints value in your set_voltage() operation. The runtime
constraints a system has should have *no* impact on the way you ask for
a specific voltage from the regulator.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/