diff options
author | Sean Nyekjaer <sean@geanix.com> | 2023-04-21 10:38:58 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-05-13 18:56:05 +0200 |
commit | 7b0d54ae76e3c6e4f0222c5af3e3d7531f62b58e (patch) | |
tree | 9822a9182f0e7c12ff698cd37830fe3bbd25ffdd /drivers/iio | |
parent | iio: light: al3320a: Handle ACPI device CALS0001 (diff) | |
download | linux-7b0d54ae76e3c6e4f0222c5af3e3d7531f62b58e.tar.xz linux-7b0d54ae76e3c6e4f0222c5af3e3d7531f62b58e.zip |
iio: adc: stm32-adc: add debug info if dt uses legacy channel config
Since nearly all stm32 dt's are using the legacy adc channel config,
we should warn users about using it.
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Link: https://lore.kernel.org/r/20230421083858.2613289-1-sean@geanix.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/stm32-adc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c index 1aadb2ad2cab..e179b6611e4d 100644 --- a/drivers/iio/adc/stm32-adc.c +++ b/drivers/iio/adc/stm32-adc.c @@ -1993,6 +1993,8 @@ static int stm32_adc_get_legacy_chan_count(struct iio_dev *indio_dev, struct stm const struct stm32_adc_info *adc_info = adc->cfg->adc_info; int num_channels = 0, ret; + dev_dbg(&indio_dev->dev, "using legacy channel config\n"); + ret = device_property_count_u32(dev, "st,adc-channels"); if (ret > adc_info->max_channels) { dev_err(&indio_dev->dev, "Bad st,adc-channels?\n"); |