Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging:iio:adc:ad7280a: Use more conservative delays to allow 105C operation.

The datasheet provides timings for operating this device at up to 105
degrees centigrade. Adopt these more conservative timings.

Suggested-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://lore.kernel.org/r/20220206190328.333093-20-jic23@kernel.org

+2 -2
+2 -2
drivers/staging/iio/adc/ad7280a.c
··· 137 137 #define AD7280A_DEVADDR_ALL 0x1F 138 138 139 139 static const unsigned short ad7280a_n_avg[4] = {1, 2, 4, 8}; 140 - static const unsigned short ad7280a_t_acq_ns[4] = {465, 1010, 1460, 1890}; 140 + static const unsigned short ad7280a_t_acq_ns[4] = {470, 1030, 1510, 1945}; 141 141 142 142 /* 5-bit device address is sent LSB first */ 143 143 static unsigned int ad7280a_devaddr(unsigned int addr) ··· 869 869 */ 870 870 871 871 st->readback_delay_us = 872 - ((ad7280a_t_acq_ns[st->acquisition_time & 0x3] + 695) * 872 + ((ad7280a_t_acq_ns[st->acquisition_time & 0x3] + 720) * 873 873 (AD7280A_NUM_CH * ad7280a_n_avg[st->oversampling_ratio & 0x3])) - 874 874 ad7280a_t_acq_ns[st->acquisition_time & 0x3] + st->slave_num * 250; 875 875