clk: qcom: gdsc: Add support to update GDSC transition delay
authorTaniya Das <tdas@codeaurora.org>
Wed, 23 Feb 2022 18:56:05 +0000 (00:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2022 13:23:35 +0000 (14:23 +0100)
commitba24eb3cc95c7138957ade43fd815588372e4db0
treef0bff49d63908d9115913548d9f2f0829a66f569
parentb6c624d07bf24ec84812ab2786814cfa99cf8df7
clk: qcom: gdsc: Add support to update GDSC transition delay

[ Upstream commit 4e7c4d3652f96f41179aab3ff53025c7a550d689 ]

GDSCs have multiple transition delays which are used for the GDSC FSM
states. Older targets/designs required these values to be updated from
gdsc code to certain default values for the FSM state to work as
expected. But on the newer targets/designs the values updated from the
GDSC driver can hamper the FSM state to not work as expected.

On SC7180 we observe black screens because the gdsc is being
enabled/disabled very rapidly and the GDSC FSM state does not work as
expected. This is due to the fact that the GDSC reset value is being
updated from SW.

Thus add support to update the transition delay from the clock
controller gdscs as required.

Fixes: 45dd0e55317cc ("clk: qcom: Add support for GDSCs)
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Link: https://lore.kernel.org/r/20220223185606.3941-1-tdas@codeaurora.org
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/qcom/gdsc.c
drivers/clk/qcom/gdsc.h