Skip to content

Commit d1f50f2

Browse files
drivers: can: tcan4x5x: do no busy wait for an entire millisecond
Switch to use k_usleep() instead of k_busy_wait() in tcan4x5x_reset() function, waiting for the reset to complete. Initially, the tcan4x5x_reset() function was only ever called during driver initialization, where busy waiting for 1000 microseconds was not an issue, but since adding device power management support, this function can now also be called during device resume. Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
1 parent 209ca85 commit d1f50f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎drivers/can/can_tcan4x5x.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ static int tcan4x5x_reset(const struct device *dev)
555555
}
556556
#endif /* TCAN4X5X_RST_GPIO_SUPPORT */
557557

558-
k_busy_wait(CAN_TCAN4X5X_T_RESET_US);
558+
k_usleep(CAN_TCAN4X5X_T_RESET_US);
559559

560560
return 0;
561561
}

0 commit comments

Comments
 (0)