Re: [PATCH v4 2/2] Regulator: Add Anatop regulator driver

From: Mark Brown
Date: Sat Feb 11 2012 - 08:17:52 EST


On Fri, Feb 10, 2012 at 10:36:38PM -0800, Shawn Guo wrote:
> On Thu, Feb 09, 2012 at 04:51:26AM +0800, Ying-Chun Liu (PaulLiu) wrote:

> > + rval = of_get_property(np, "min-voltage", NULL);
> > + if (rval)
> > + sreg->rdata->min_voltage = be32_to_cpu(*rval);
> > + rval = of_get_property(np, "max-voltage", NULL);
> > + if (rval)
> > + sreg->rdata->max_voltage = be32_to_cpu(*rval);

> We need a sensible binding document to understand those. But at least,
> shouldn't min-voltage and max-voltage be retrieved as the common
> regulator binding documented in
> Documentation/devicetree/bindings/regulator/regulator.txt?

Normally this would be a bad idea as the set of voltages that can safely
be used on a given board might differ from those which are supported by
the device. However in this case you might be OK as this is all
internal to the SoC and so presumably won't vary from board to board.

Attachment: signature.asc
Description: Digital signature