Re: [PATCH 1/2] regulator: max8660: Remove boot_on handling

From: Markus Pargmann
Date: Tue Mar 24 2015 - 12:49:33 EST


On Tue, Mar 24, 2015 at 09:22:27AM -0700, Mark Brown wrote:
> On Tue, Mar 24, 2015 at 01:08:02PM +0100, Markus Pargmann wrote:
>
> > boot_on is handled by the regulator core. It will call enable() on the
> > regulators that are specified to be boot_on. So we don't require any
> > additional handling in this driver
>
> > switch (pdata->subdevs[i].id) {
> > case MAX8660_V3:
> > - if (boot_on)
> > - max8660->shadow_regs[MAX8660_OVER1] |= 1;
> > - break;
> > -
>
> So, this is updating the register default value rather than writing to
> the device. That suggests that the purpose is to either avoid needless
> write outs to the device or something, or at the very least it's not a
> completely direct reimplementation of the core functionality. It is
> certainly underdocumented at the minute (and the driver probably wants
> to be converted to regmap) but this makes me a bit cautious about
> obvious cleanups missing something.

Sorry, this patch is wrong. I just realized that this chip is write-only
and has different regulators that share the same registers. So it is
impossible to selectively enable some regulators without accidentaly
disabling others that may be enabled. So the code is necessary.

Thanks,

Markus

--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

Attachment: signature.asc
Description: Digital signature