summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/stm32-adc.c
diff options
context:
space:
mode:
authorOlivier Moysan <olivier.moysan@foss.st.com>2022-11-15 11:31:22 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-11-23 20:56:13 +0000
commit2206732b9ad1be8c59f714f2912539bf95cf2961 (patch)
treeeeaed565d4a55bddd74dbdf6e748306e697df036 /drivers/iio/adc/stm32-adc.c
parent9d901e356c8d3640940cb72ff7969f03e85c2e95 (diff)
iio: adc: stm32-adc: improve calibration error log
Add more information in calibration error log to differentiate single-ended and differential calibration. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/20221115103124.70074-3-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/stm32-adc.c')
-rw-r--r--drivers/iio/adc/stm32-adc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
index 2b2b55eb130e..65dd45537505 100644
--- a/drivers/iio/adc/stm32-adc.c
+++ b/drivers/iio/adc/stm32-adc.c
@@ -1109,7 +1109,7 @@ static int stm32h7_adc_selfcalib(struct iio_dev *indio_dev, int do_lincal)
!(val & STM32H7_ADCAL), 100,
STM32H7_ADC_CALIB_TIMEOUT_US);
if (ret) {
- dev_err(&indio_dev->dev, "calibration failed\n");
+ dev_err(&indio_dev->dev, "calibration (single-ended) error %d\n", ret);
goto out;
}
@@ -1125,7 +1125,8 @@ static int stm32h7_adc_selfcalib(struct iio_dev *indio_dev, int do_lincal)
!(val & STM32H7_ADCAL), 100,
STM32H7_ADC_CALIB_TIMEOUT_US);
if (ret) {
- dev_err(&indio_dev->dev, "calibration failed\n");
+ dev_err(&indio_dev->dev, "calibration (diff%s) error %d\n",
+ (msk & STM32H7_ADCALLIN) ? "+linear" : "", ret);
goto out;
}