summaryrefslogtreecommitdiff
path: root/drivers/button/button-qcom-pmic.c
diff options
context:
space:
mode:
authorStephan Gerhold <stephan.gerhold@linaro.org>2025-04-24 11:16:44 +0200
committerCasey Connolly <casey.connolly@linaro.org>2025-06-02 18:20:15 +0200
commit6c049ed99392353bcda24f708e1cfa5c21f2a0f9 (patch)
treeed9621159422ee3fe60331b9f58ce38fd87ffa49 /drivers/button/button-qcom-pmic.c
parent94e57ba2011b4bb96c0714e02a5056bc0c7f87d0 (diff)
clk: qcom: Allow polling for clock status in qcom_gate_clk_en()
GATE_CLK() in its current state is unsafe: A simple write to the clock enable register does not guarantee that the clock is immediately running. Without polling the clock status, we may issue writes to registers before the necessary clocks start running. This doesn't seem to cause issues in U-Boot at the moment, but for example removing the CLK_OFF polling in TF-A for the SMMU clocks on DB410c reliably triggers an exception during boot. Make it possible to poll the branch clock status register, by adding a new GATE_CLK_POLLED() macro that takes the extra register address. Existing usages work just as before, without polling the clock status. Ideally all usages should be updated to specify the correct poll address in the future. The Qualcomm naming for these clocks is "branch" and not "gate", but let's keep the existing naming for now to avoid confusion until all others drivers have been converted. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://lore.kernel.org/r/20250424-apq8016-clock-fixes2-v2-4-fcc371c9e45f@linaro.org Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Diffstat (limited to 'drivers/button/button-qcom-pmic.c')
0 files changed, 0 insertions, 0 deletions