Skip to content
Commit 88051f55 authored by Stephen Boyd's avatar Stephen Boyd
Browse files

clk: qcom: Simplify gdsc status checking logic



The code is complicated because we want to check if the GDSC is enabled
or disabled based on different bits in different registers while the
GDSC hardware is slightly different across chips. Furthermore, we poll
the status of the enable or disable state by checking if the gdsc is
enabled or not, and then comparing that to if the gdsc is being enabled
or disabled. Let's push all that into one function, so we can ask if the
status matches what we want, either on or off. Then the call site can
just ask that question, and the logic to check that state can simply
return yes or no, and not 1 or 0 or 0 or 1 depending on if we're
enabling or disabling respectively.

Tested-by: default avatarTaniya Das <tdas@codeaurora.org>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent e892e17d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment