i2c: nvidia-gpu: Handle timeout correctly in gpu_i2c_check_status()
Nvidia card may come with a "phantom" UCSI device, and its driver gets
stuck in probe routine, prevents any system PM operations like suspend.
There's an unaccounted case that the target time can equal to jiffies in
gpu_i2c_check_status(), let's solve that by using readl_poll_timeout()
instead of jiffies comparison functions.
Fixes: c71bcdcb42a7 ("i2c: add i2c bus driver for NVIDIA GPU")
Suggested-by: Andy Shevchenko <email@example.com>
Signed-off-by: Kai-Heng Feng <firstname.lastname@example.org>
Reviewed-by: Andy Shevchenko <email@example.com>
Reviewed-by: Ajay Gupta <firstname.lastname@example.org>
Tested-by: Ajay Gupta <email@example.com>
Signed-off-by: Wolfram Sang <firstname.lastname@example.org>
1 file changed