Re: [PATCH 1/2] regulator: core: Check before enabling regulatorwhile setting constraints.

From: Mark Brown
Date: Tue Oct 16 2012 - 01:35:01 EST

On Tue, Oct 16, 2012 at 10:54:19AM +0530, Yadwinder Singh Brar wrote:
> This patch adds check, whether regulator is already enabled before enabling it
> while setting machine constraints. Since some PMICs have same register bits
> for setting opmode and enabling/disabling the regulator, so it will overwrite
> the settings (if any)done by set_mode/set_suspend_mode callbacks when it
> enables regulator without checking previous status.

This sounds like a bug in the driver, these ops are supposed to be
repeatable at will. The driver needs to remember the mode setting when
doing enable or disable, and setting the mode should not change the
enable status.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at