From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D0452139A2 for ; Tue, 18 Jun 2024 14:17:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718720279; cv=none; b=cZBt3GIXrdjCeQCFeUYvoLmQwXjYjUX3d4mruGOoyKLHx/AZnEOfTNhXIVeL+TPWup9+G3JUgwe1DYpNPzVuv/3wENoqhpLNLf2xnnXsXuWCdg6PXSLlJOQfQLz6VMXSo025gSaVI3CnaZT8JYkdtFMwBL8P6Uby0ti6myTJlwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718720279; c=relaxed/simple; bh=y5SyDCYwa5vTf1CHBmxcKmCBqiloLuQ+fZr0BRWMerA=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=JNRr2VKieJRDsxejjzb3eO5dASHry6VqtvIReN4wZvfdBIu1eaY/Drom2bxC6totxTHYmAIBMsAjumorN3em7S+JbFgqOkcMeEVfbDUPOFUopnjgZgk5Dn61OG0E6eR2ZxJjGfHqyVgZ1vjy20nKizBCkATRWqS8gmEsaM0GKQs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NaVk0fxn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NaVk0fxn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65386C3277B; Tue, 18 Jun 2024 14:17:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718720278; bh=y5SyDCYwa5vTf1CHBmxcKmCBqiloLuQ+fZr0BRWMerA=; h=Subject:To:Cc:From:Date:From; b=NaVk0fxnCDE0WhENYJauXvwJhYhbntDdOvupn20SBmegvLxjA0d062Prn52FkIajB ky3w4m6OuxhQmrER0NHGC72ETCyFoIpkjYprPcUrSyjcbUoJKheROTqginuGshekTc 3FM8RPGtevdLMG7+G2/Mj4xHnuHvAbz359SqenSY= Subject: FAILED: patch "[PATCH] iio: adc: axi-adc: make sure AXI clock is enabled" failed to apply to 5.15-stable tree To: nuno.sa@analog.com,Jonathan.Cameron@huawei.com,Stable@vger.kernel.org Cc: From: Date: Tue, 18 Jun 2024 16:17:45 +0200 Message-ID: <2024061844-frosty-hungry-66ea@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-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 . 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.15.y git checkout FETCH_HEAD git cherry-pick -x 80721776c5af6f6dce7d84ba8df063957aa425a2 # git commit -s git send-email --to '' --in-reply-to '2024061844-frosty-hungry-66ea@gregkh' --subject-prefix 'PATCH 5.15.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 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 Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-4-6361fc3ba1cc@analog.com Cc: Signed-off-by: Jonathan Cameron 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...