]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: ti-ads1298: Fix incorrect timeout comment
authorMd Shofiqul Islam <shofiqtest@gmail.com>
Sun, 10 May 2026 19:34:35 +0000 (22:34 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2026 09:59:38 +0000 (10:59 +0100)
commitd0f23d8a9091f43329e79bcd29bcac6bf81205e5
treef743e4a60832d959c1a210d99a5504edb2bf5360
parentaf74304c9fe93c32e9ab2d0fc7c2717ba99a45a1
iio: adc: ti-ads1298: Fix incorrect timeout comment

At the lowest supported data rate of 250Hz, one conversion period is
4ms, not 40ms. The 50ms timeout is deliberately conservative to allow
for kernel scheduling latency, which can be significant under load or
on slow machines.

Fix the comment to state the correct conversion time, use "lowest sample
rate" for clarity, and explain that the extra margin exists to absorb
scheduling latency so that no one is tempted to shrink the timeout to
match the conversion period.

Also drop the redundant ret variable assignment by using the return value
of wait_for_completion_timeout() directly in the if() condition.

Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/ti-ads1298.c