The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 80721776c5af6f6dce7d84ba8df063957aa425a2 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2024061845-applause-lanky-c87c@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
80721776c5af ("iio: adc: axi-adc: make sure AXI clock is enabled") 794ef0e57854 ("iio: adc: adi-axi-adc: move to backend framework") 9c446288d7b3 ("iio: buffer-dmaengine: export buffer alloc and free functions") 21aa971d3e29 ("iio: adc: adi-axi-adc: convert to regmap") b73f08bb7fe5 ("iio: adc: ad9467: fix scale setting") 1240c94ce819 ("iio: adc: Explicitly include correct DT includes") 4c077429b422 ("iio: mlx90614: Sort headers") a99544c6c883 ("iio: adc: palmas: add support for iio threshold events") 2d48dbdfc7d4 ("iio: adc: palmas: move eventX_enable into palmas_adc_event") 7501a3a97e4f ("iio: adc: palmas: use iio_event_direction for threshold polarity") d2ab4eea732d ("iio: adc: palmas: replace "wakeup" with "event"") 79d9622d622d ("iio: adc: palmas: remove adc_wakeupX_data") 6d52b0e70698 ("iio: adc: palmas: Take probe fully device managed.") 49f76c499d38 ("iio: adc: palmas_gpadc: fix NULL dereference on rmmod") 2a3c8f8a4494 ("Merge tag 'iio-for-5.20a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 80721776c5af6f6dce7d84ba8df063957aa425a2 Mon Sep 17 00:00:00 2001 From: Nuno Sa nuno.sa@analog.com Date: Fri, 26 Apr 2024 17:42:13 +0200 Subject: [PATCH] iio: adc: axi-adc: make sure AXI clock is enabled
We can only access the IP core registers if the bus clock is enabled. As such we need to get and enable it and not rely on anyone else to do it.
Note this clock is a very fundamental one that is typically enabled pretty early during boot. Independently of that, we should really rely on it to be enabled.
Fixes: ef04070692a2 ("iio: adc: adi-axi-adc: add support for AXI ADC IP core") Signed-off-by: Nuno Sa nuno.sa@analog.com Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-4-6361fc3ba1cc@ana... Cc: Stable@vger.kernel.org Signed-off-by: Jonathan Cameron Jonathan.Cameron@huawei.com
diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c index 9444b0c5a93c..f54830658da8 100644 --- a/drivers/iio/adc/adi-axi-adc.c +++ b/drivers/iio/adc/adi-axi-adc.c @@ -161,6 +161,7 @@ static int adi_axi_adc_probe(struct platform_device *pdev) struct adi_axi_adc_state *st; void __iomem *base; unsigned int ver; + struct clk *clk; int ret;
st = devm_kzalloc(&pdev->dev, sizeof(*st), GFP_KERNEL); @@ -181,6 +182,10 @@ static int adi_axi_adc_probe(struct platform_device *pdev) if (!expected_ver) return -ENODEV;
+ clk = devm_clk_get_enabled(&pdev->dev, NULL); + if (IS_ERR(clk)) + return PTR_ERR(clk); + /* * Force disable the core. Up to the frontend to enable us. And we can * still read/write registers...
linux-stable-mirror@lists.linaro.org