RE: [PATCH 1/2] regulator: support operating mode in the devicetree structure

From: Kim, Milo
Date: Tue May 07 2013 - 19:46:30 EST


> -----Original Message-----
> From: Mark Brown [mailto:broonie@xxxxxxxxxx]
> Sent: Wednesday, May 08, 2013 1:05 AM
> To: Kim, Milo
> Cc: Liam Girdwood; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH 1/2] regulator: support operating mode in the
> device tree structure
>
> On Tue, May 07, 2013 at 01:09:14PM +0000, Kim, Milo wrote:
> > For better power efficiency, regulator subsystem provides operating
> mode.
> > (fast, normal, idle and standby)
> > The operating mode is selective by a regulator consumer.
> >
> > With this patch, regulator operating mode can be set in the DT
> structure.
> > If any operating mode is configured, then 'valid_ops_mask' should be
> set with
> > REGULATOR_CHANGE_MODE.
>
> It's not clear to me that these modes are a useful thing to be exposing
> in device tree - they've always been rather arbatrary and are becoming
> less and less relevant as regulator hardware improves in its ability to
> adapt to load. I think for fixed modes that don't vary dynamically at
> runtime the best thing is just to make the modes custom so they map
> onto
> the device datasheets clearly. That seems to be most of the usage
> anyway.

I agree the operating mode depends on the device.

It's my intention to guarantee same operations in the DT as the regulator
constraints in the platform side.
In case a regulator has specific 'valid_modes_mask', the operating mode is
unable to be set with the device tree.
For some regulator drivers such as LP8720/5 and LP8788, this patch would be
useful because there is no difference between configuration in the platform side
and the device tree.

Thanks,
Milo

--
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/