Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: reset: Use the correct type of sleep/delay based on length

Use the fsleep() helper that (based on the length of the delay, see: [1])
chooses the correct sleep/delay functions.

[1] https://www.kernel.org/doc/Documentation/timers/timers-howto.txt

Fixes: 2cb8a39b6781 ("clk: qcom: reset: Allow specifying custom reset delay")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230726-topic-qcom_reset-v3-1-5958facd5db2@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Konrad Dybcio and committed by
Bjorn Andersson
181b66ee b6bcd1c0

+2 -1
+2 -1
drivers/clk/qcom/reset.c
··· 16 16 struct qcom_reset_controller *rst = to_qcom_reset_controller(rcdev); 17 17 18 18 rcdev->ops->assert(rcdev, id); 19 - udelay(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */ 19 + fsleep(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */ 20 + 20 21 rcdev->ops->deassert(rcdev, id); 21 22 return 0; 22 23 }