Re: [PATCH] regulator: core: Use parent voltage from the supply when bypassed

From: Mark Brown
Date: Thu Mar 31 2016 - 13:55:40 EST

On Thu, Mar 31, 2016 at 03:27:58PM +0100, Jon Hunter wrote:
> On 30/03/16 18:32, Mark Brown wrote:

> > + if (bypassed) {
> > + if (rdev->supply) {
> > + ret = _regulator_get_voltage(rdev->supply->rdev);

> Should this be a return here?

Gnargh, yes.

> I gave this a quick test on tegra124 having populated the
> get/set_bypass() operators for the as3722. In this case, there is still
> a problem because _regulator_get_voltage() is called during regulator
> registration when set_machine_constraints() is called, which is before
> we have called regulator_register_resolve_supply(). Therefore, it seems
> to me that we still need to resolve the supply before we call
> set_machine_constraints().

OK, we need to change the code there to defer probe in the case where
the device is in bypass mode as well.

Attachment: signature.asc
Description: PGP signature