mirror of
https://github.com/torvalds/linux.git
synced 2024-10-23 21:50:43 +00:00
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: 2cb8a39b67
("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>
This commit is contained in:
parent
b6bcd1c0c2
commit
181b66ee7c
|
@ -16,7 +16,8 @@ static int qcom_reset(struct reset_controller_dev *rcdev, unsigned long id)
|
|||
struct qcom_reset_controller *rst = to_qcom_reset_controller(rcdev);
|
||||
|
||||
rcdev->ops->assert(rcdev, id);
|
||||
udelay(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */
|
||||
fsleep(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */
|
||||
|
||||
rcdev->ops->deassert(rcdev, id);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user