aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/trigger/stm32-timer-trigger.c
diff options
context:
space:
mode:
authorStefan Brüns <[email protected]>2017-07-26 21:32:06 +0000
committerJonathan Cameron <[email protected]>2017-07-30 13:50:19 +0000
commitff3aa88a4d61468baece3fc2bb54e2a3bea6360f (patch)
tree963771037ce6cdcf0f27604070ad6eb2bccf7aae /drivers/iio/trigger/stm32-timer-trigger.c
parentiio: trigger: stm32-timer: add enable attribute (diff)
downloadkernel-ff3aa88a4d61468baece3fc2bb54e2a3bea6360f.tar.gz
kernel-ff3aa88a4d61468baece3fc2bb54e2a3bea6360f.zip
iio: adc: ina219: Avoid underflow for sleeping time
Proper support for the INA219 lowered the minimum sampling period from 2*140us to 2*84us. Subtracting 200us later leads to an underflow and an almost infinite udelay later. Using a signed int for the sampling period provides sufficient range (at most 2*8640*1024us), but catches the underflow when comparing with buffer_us. Fixes: 18edac2e22f4 ("iio: adc: Fix integration time/averaging for INA219/220") Signed-off-by: Stefan Brüns <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'drivers/iio/trigger/stm32-timer-trigger.c')
0 files changed, 0 insertions, 0 deletions