Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2bf474bf authored by Taniya Das's avatar Taniya Das Committed by Veera Vegivada
Browse files

clk: qcom: gdsc-regulator: Add missing support



Some GDSCs have side effects when enabled without first
performing a special reset sequence.  It is only feasible for
this sequence to be performed by the always-on processor (AOP)
when it is resuming from system sleep.  Add support for a device
tree flag which can be specified in order to skip physically
disabling a GDSC when regulator_disable() is called.  The AOP
will then ensure that the GDSC is disabled upon entering system
sleep and appropriately reset upon resuming from system sleep.

Also change the is_enabled() callback so that it returns the
GDSC logical enable state instead of the physical enable state
whenever the disable skipping flag is specified.  This ensures
that all dependent regulator and bus requests are made in the
case of disabling and re-enabling a GDSC without entering system
sleep (i.e. when the GDSC shows up as still physically enabled.)

If the disable skipping feature is allowed in device tree, then
use regulator_set_mode() to control the feature's usage at
runtime.  This is needed for SM8150 gpu_cx_gdsc in order to
facilitate GMU hang recovery.

REGULATOR_MODE_NORMAL (default) --> physical GDSC disable skipped
REGULATOR_MODE_IDLE             --> physical GDSC disable occurs.

Change-Id: I3966fd1ac59acef215c4c051efb293a49e5ebdbd
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent df578599
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment