Linux IIO development
 help / color / mirror / Atom feed
* [PATCH 1/3] iio: adc: stm32-adc: warn if dt uses legacy channel config
@ 2023-03-27  8:34 Sean Nyekjaer
  2023-03-27  8:34 ` [PATCH 2/3] iio: adc: stm32-adc: skip adc-diff-channels setup if none is present Sean Nyekjaer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sean Nyekjaer @ 2023-03-27  8:34 UTC (permalink / raw)
  To: jic23, lars, alexandre.torgue, nuno.sa
  Cc: Sean Nyekjaer, linux-iio, linux-stm32

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>
---
 drivers/iio/adc/stm32-adc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
index 1aadb2ad2cab..d8e755d0cc52 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_warn(&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");
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-03  9:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-27  8:34 [PATCH 1/3] iio: adc: stm32-adc: warn if dt uses legacy channel config Sean Nyekjaer
2023-03-27  8:34 ` [PATCH 2/3] iio: adc: stm32-adc: skip adc-diff-channels setup if none is present Sean Nyekjaer
2023-03-27  8:34 ` [PATCH 3/3] iio: adc: stm32-adc: skip adc-channels " Sean Nyekjaer
2023-04-03  9:29   ` [Linux-stm32] " Olivier MOYSAN
2023-03-30 15:30 ` [Linux-stm32] [PATCH 1/3] iio: adc: stm32-adc: warn if dt uses legacy channel config Fabrice Gasnier
2023-04-01 14:04   ` Jonathan Cameron
2023-04-01 15:37     ` Sean Nyekjær

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox