summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/stm32-adc-core.c
diff options
context:
space:
mode:
authorOlivier Moysan <olivier.moysan@foss.st.com>2021-10-14 15:12:26 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-10-20 14:43:54 +0100
commitaec6e0d8f0fe2e99c6486ebf1979fe2a03890e39 (patch)
treeb2e4049b85b76bbf1460bd4ca9f4f3eb51ad050c /drivers/iio/adc/stm32-adc-core.c
parent95bc818404b2c1a61611365ecf434a52f01ee97d (diff)
iio: adc: stm32-adc: add support of internal channels
Add support of ADC2 internal channels VDDCORE, VREFINT and VBAT. The reserved label name "vddcore", "vrefint" and "vbat" must be used in Device Tree channel node, to enable the corresponding internal channel. Note: This patch does not provide support of internal channels for F4 and H7. 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/20211014131228.4692-6-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/stm32-adc-core.c')
-rw-r--r--drivers/iio/adc/stm32-adc-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
index c088cb990193..b6e18eb101f7 100644
--- a/drivers/iio/adc/stm32-adc-core.c
+++ b/drivers/iio/adc/stm32-adc-core.c
@@ -659,6 +659,7 @@ static int stm32_adc_probe(struct platform_device *pdev)
priv->cfg = (const struct stm32_adc_priv_cfg *)
of_match_device(dev->driver->of_match_table, dev)->data;
+ spin_lock_init(&priv->common.lock);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->common.base = devm_ioremap_resource(&pdev->dev, res);