History log of /linux-master/drivers/iio/adc/ti-ads1298.c
Revision Date Author Comments
# df621530 21-Feb-2024 Dan Carpenter <dan.carpenter@linaro.org>

iio: adc: ti-ads1298: prevent divide by zero in ads1298_set_samp_freq()

The "val" variable comes from the user so we need to ensure that it's not
zero. In fact, all negative values are invalid as well. Add a check for
that.

Fixes: 00ef7708fa60 ("iio: adc: ti-ads1298: Add driver")
Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/c32c9087-86de-423b-8101-67b4a7f9d728@moroto.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>


# debabbb1 21-Feb-2024 Dan Carpenter <dan.carpenter@linaro.org>

iio: adc: ti-ads1298: Fix error code in probe()

There is a copy and paste bug here, it should be "reg_vref" instead of
"reg_avdd". The "priv->reg_avdd" variable is zero so it ends up
returning success.

Fixes: 00ef7708fa60 ("iio: adc: ti-ads1298: Add driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
Link: https://lore.kernel.org/r/5f393a87-ca8b-4e68-a6f4-a79f75a91ccb@moroto.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>


# 00ef7708 16-Feb-2024 Mike Looijmans <mike.looijmans@topic.nl>

iio: adc: ti-ads1298: Add driver

Skeleton driver for the TI ADS1298 medical ADC. This device is
typically used for ECG and similar measurements. Supports data
acquisition at configurable scale and sampling frequency.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Link: https://lore.kernel.org/r/20240216153020.485201-2-mike.looijmans@topic.nl
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>