]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
iio: adc: stm32-adc: add debug info if dt uses legacy channel config
authorSean Nyekjaer <sean@geanix.com>
Fri, 21 Apr 2023 08:38:58 +0000 (10:38 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 13 May 2023 16:56:05 +0000 (17:56 +0100)
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>
drivers/iio/adc/stm32-adc.c

index 1aadb2ad2cabdf12130030d4bf8b341b0fb93c42..e179b6611e4d8eced7331e776e65d69c4c319025 100644 (file)
@@ -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");