clk: qcom: reset: Use the correct type of sleep/delay based on length
Subsystems (3)
PATCH v3 1/1 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
---
Let the toggle include a bigger delay and make sure it's using the
correct function to achieve that.
---
Changes in v3:
- Improve the commit message
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Drop the "allow bigger delay" until there's a user
- Use fsleep instead of open-coding effectively the same
- Fix the fixes tag
- Link to v1: https://lore.kernel.org/r/[email protected]
--- drivers/clk/qcom/reset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/qcom/reset.c +2 -1
@@ -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 ; }
---
base-commit: 451cc82bd11eb6a374f4dbcfc1cf007eafea91ab
change-id: 20230726-topic-qcom_reset-44879c0387c6
Best regards,
Signature · 1 line
Konrad Dybcio <[email protected]>