msm: krait-regulator: enable/disable MDD with hotplug
Currently the code enables/disables MDD as the core goes to/comes out of
retention. The problem with this approach is that if that core switches
to BHS (likely because another core changes its frequency) the driver
turns off its MDD completely oblivious of the fact that that core is
running in retention and needs its MDD on.
This causes retention on that cpu to crash.
Its best if the driver keeps the MDD on always while a core is online
regardless of whether it is operating in LDO or BHS mode. MDD would then
be turned off when the core goes offline. This way we keep the MDD on
throughout idle power collapses and associated retention modes.
Also when the system goes to suspend, secondary cpus are offlined. This
will result in their MDD turned off. However for boot cpu, hook in to
the syscore ops callbacks to turn on/off the MDD.
Change-Id: I9ff5826fd87782ce1b407bd3702f791751bc60fd
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
3 files changed