Re: [PATCH v2 2/2] MAX8997/8966 PMIC Regulator Driver InitialRelease

From: Mark Brown
Date: Tue Mar 08 2011 - 07:41:58 EST


On Tue, Mar 08, 2011 at 10:50:04AM +0900, MyungJoo Ham wrote:
> On Sat, Mar 5, 2011 at 9:03 PM, Mark Brown

> > This looks odd, especially since you have a disable operation?

> The intention is to keep it enabled if it was enabled before entering
> sleep and not to enable if it has not been using while the system is
> running. Probably, we need three states for suspend-prepare for
> regulators: disable, enable, keep_state?

No, that's not what the suspend mode settings are doing. Many
regulators have separate state configuration for use when the system is
suspended, the purpose of suspend_prepare() is to configure that. They
are orthogonal to the state seen when the system is running and it is
expected that the previously configured state will be automatically
recovered when exiting suspend.

The reason we set this stuff immediately before suspend is that Linux
has multiple suspend types so we need to adjust the configuration to
reflect the suspend type that's been chosen.
--
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/