linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework
@ 2021-06-13 23:30 Alexander Sverdlin
  2021-06-13 23:30 ` [PATCH 1/7] iio: ep93xx: Prepare clock before using it Alexander Sverdlin
  2021-06-14  7:15 ` [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Uwe Kleine-König
  0 siblings, 2 replies; 7+ messages in thread
From: Alexander Sverdlin @ 2021-06-13 23:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, Nikita Shubin
  Cc: Alexander Sverdlin, Vinod Koul, Jonathan Cameron,
	Lars-Peter Clausen, Dmitry Torokhov, Thierry Reding,
	Uwe Kleine-König, Lee Jones, Mark Brown, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, dmaengine, linux-iio, linux-input,
	linux-pwm, linux-spi, dri-devel, linux-fbdev, alsa-devel,
	linux-kernel

Nikita posted a patch converting EP93xx to use Common Clock Framework. It
turns out some cleanup is necessary in the EP93xx drivers to avoid
"Enabling unprepared" clock warnings.

Patches with stack traces in the commit messages are tested on EP9302.

Link: https://lore.kernel.org/patchwork/patch/1435884/

Alexander Sverdlin (7):
  iio: ep93xx: Prepare clock before using it
  spi: spi-ep93xx: Prepare clock before using it
  Input: ep93xx_keypad: Prepare clock before using it
  video: ep93xx: Prepare clock before using it
  dmaengine: ep93xx: Prepare clock before using it
  ASoC: cirrus: i2s: Prepare clock before using it
  pwm: ep93xx: Prepare clock before using it

 drivers/dma/ep93xx_dma.c               |  6 +++---
 drivers/iio/adc/ep93xx_adc.c           |  6 +++---
 drivers/input/keyboard/ep93xx_keypad.c |  4 ++--
 drivers/pwm/pwm-ep93xx.c               | 12 ++++++------
 drivers/spi/spi-ep93xx.c               |  4 ++--
 drivers/video/fbdev/ep93xx-fb.c        |  4 ++--
 sound/soc/cirrus/ep93xx-i2s.c          | 12 ++++++------
 7 files changed, 24 insertions(+), 24 deletions(-)

-- 
2.32.0


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

* [PATCH 1/7] iio: ep93xx: Prepare clock before using it
  2021-06-13 23:30 [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Alexander Sverdlin
@ 2021-06-13 23:30 ` Alexander Sverdlin
  2021-06-14 10:50   ` Jonathan Cameron
  2021-06-14  7:15 ` [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Uwe Kleine-König
  1 sibling, 1 reply; 7+ messages in thread
From: Alexander Sverdlin @ 2021-06-13 23:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, Nikita Shubin, linux-iio
  Cc: Alexander Sverdlin, Jonathan Cameron, Lars-Peter Clausen,
	linux-kernel

Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
to Common Clock Framework, otherwise the following is visible:

WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc
Enabling unprepared ep93xx-adc
CPU: 0 PID: 1 Comm: swapper Not tainted 5.13.0-rc5-... #1
Hardware name: Cirrus Logic EDB9302 Evaluation Board
[<c000d5b0>] (unwind_backtrace) from [<c000c590>] (show_stack+0x10/0x18)
[<c000c590>] (show_stack) from [<c03a5f38>] (dump_stack+0x20/0x2c)
[<c03a5f38>] (dump_stack) from [<c03a2098>] (__warn+0x98/0xc0)
[<c03a2098>] (__warn) from [<c03a2150>] (warn_slowpath_fmt+0x90/0xc0)
[<c03a2150>] (warn_slowpath_fmt) from [<c01d8358>] (clk_core_enable+0x9c/0xbc)
[<c01d8358>] (clk_core_enable) from [<c01d8698>] (clk_core_enable_lock+0x18/0x30)
[<c01d8698>] (clk_core_enable_lock) from [<c0266560>] (ep93xx_adc_probe+0xe4/0x1a0)
[<c0266560>] (ep93xx_adc_probe) from [<c02126e0>] (platform_probe+0x34/0x80)
[<c02126e0>] (platform_probe) from [<c0210bf8>] (really_probe+0xe8/0x394)
[<c0210bf8>] (really_probe) from [<c0211464>] (device_driver_attach+0x5c/0x64)
[<c0211464>] (device_driver_attach) from [<c02114e8>] (__driver_attach+0x7c/0xec)
[<c02114e8>] (__driver_attach) from [<c020f1b4>] (bus_for_each_dev+0x78/0xc4)
[<c020f1b4>] (bus_for_each_dev) from [<c0211570>] (driver_attach+0x18/0x24)
[<c0211570>] (driver_attach) from [<c020fab4>] (bus_add_driver+0x140/0x1cc)
[<c020fab4>] (bus_add_driver) from [<c0211c44>] (driver_register+0x74/0x114)
[<c0211c44>] (driver_register) from [<c02134f8>] (__platform_driver_register+0x18/0x24)
[<c02134f8>] (__platform_driver_register) from [<c0470148>] (ep93xx_adc_driver_init+0x10/0x1c)
[<c0470148>] (ep93xx_adc_driver_init) from [<c045ce88>] (do_one_initcall+0x7c/0x1a4)
[<c045ce88>] (do_one_initcall) from [<c045d184>] (kernel_init_freeable+0x17c/0x1fc)
[<c045d184>] (kernel_init_freeable) from [<c03a64d0>] (kernel_init+0x8/0xf8)
[<c03a64d0>] (kernel_init) from [<c00082d8>] (ret_from_fork+0x14/0x3c)
...
ep93xx-adc ep93xx-adc: Cannot enable clock
ep93xx-adc: probe of ep93xx-adc failed with error -108

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 drivers/iio/adc/ep93xx_adc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c
index c08ab3c6dfaf..5c85257b814c 100644
--- a/drivers/iio/adc/ep93xx_adc.c
+++ b/drivers/iio/adc/ep93xx_adc.c
@@ -207,7 +207,7 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
 		 */
 	}
 
-	ret = clk_enable(priv->clk);
+	ret = clk_prepare_enable(priv->clk);
 	if (ret) {
 		dev_err(&pdev->dev, "Cannot enable clock\n");
 		return ret;
@@ -215,7 +215,7 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
 
 	ret = iio_device_register(iiodev);
 	if (ret)
-		clk_disable(priv->clk);
+		clk_disable_unprepare(priv->clk);
 
 	return ret;
 }
@@ -226,7 +226,7 @@ static int ep93xx_adc_remove(struct platform_device *pdev)
 	struct ep93xx_adc_priv *priv = iio_priv(iiodev);
 
 	iio_device_unregister(iiodev);
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 
 	return 0;
 }
-- 
2.32.0


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

* Re: [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework
  2021-06-13 23:30 [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Alexander Sverdlin
  2021-06-13 23:30 ` [PATCH 1/7] iio: ep93xx: Prepare clock before using it Alexander Sverdlin
@ 2021-06-14  7:15 ` Uwe Kleine-König
  1 sibling, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2021-06-14  7:15 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Geert Uytterhoeven, Nikita Shubin, Vinod Koul, Jonathan Cameron,
	Lars-Peter Clausen, Dmitry Torokhov, Thierry Reding, Lee Jones,
	Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	dmaengine, linux-iio, linux-input, linux-pwm, linux-spi,
	dri-devel, linux-fbdev, alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

On Mon, Jun 14, 2021 at 01:30:34AM +0200, Alexander Sverdlin wrote:
> Nikita posted a patch converting EP93xx to use Common Clock Framework. It
> turns out some cleanup is necessary in the EP93xx drivers to avoid
> "Enabling unprepared" clock warnings.
> 
> Patches with stack traces in the commit messages are tested on EP9302.

One thing to note is: ep93xx currently doesn't provide a clk_prepare
function, this isn't a problem though because include/linux/clk.h
provides a dummy if CONFIG_HAVE_CLK_PREPARE isn't defined. So as ep93xx
doesn't define this symbol the changes here effectively only add a
might_sleep.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 1/7] iio: ep93xx: Prepare clock before using it
  2021-06-13 23:30 ` [PATCH 1/7] iio: ep93xx: Prepare clock before using it Alexander Sverdlin
@ 2021-06-14 10:50   ` Jonathan Cameron
  2021-06-14 10:59     ` Alexander Sverdlin
  2021-08-02  7:30     ` Alexander Sverdlin
  0 siblings, 2 replies; 7+ messages in thread
From: Jonathan Cameron @ 2021-06-14 10:50 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-iio, Lars-Peter Clausen,
	linux-kernel

On Mon, 14 Jun 2021 01:30:35 +0200
Alexander Sverdlin <alexander.sverdlin@gmail.com> wrote:

> Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> to Common Clock Framework, otherwise the following is visible:
> 
> WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc
> Enabling unprepared ep93xx-adc
> CPU: 0 PID: 1 Comm: swapper Not tainted 5.13.0-rc5-... #1
> Hardware name: Cirrus Logic EDB9302 Evaluation Board
> [<c000d5b0>] (unwind_backtrace) from [<c000c590>] (show_stack+0x10/0x18)
> [<c000c590>] (show_stack) from [<c03a5f38>] (dump_stack+0x20/0x2c)
> [<c03a5f38>] (dump_stack) from [<c03a2098>] (__warn+0x98/0xc0)
> [<c03a2098>] (__warn) from [<c03a2150>] (warn_slowpath_fmt+0x90/0xc0)
> [<c03a2150>] (warn_slowpath_fmt) from [<c01d8358>] (clk_core_enable+0x9c/0xbc)
> [<c01d8358>] (clk_core_enable) from [<c01d8698>] (clk_core_enable_lock+0x18/0x30)
> [<c01d8698>] (clk_core_enable_lock) from [<c0266560>] (ep93xx_adc_probe+0xe4/0x1a0)
> [<c0266560>] (ep93xx_adc_probe) from [<c02126e0>] (platform_probe+0x34/0x80)
> [<c02126e0>] (platform_probe) from [<c0210bf8>] (really_probe+0xe8/0x394)
> [<c0210bf8>] (really_probe) from [<c0211464>] (device_driver_attach+0x5c/0x64)
> [<c0211464>] (device_driver_attach) from [<c02114e8>] (__driver_attach+0x7c/0xec)
> [<c02114e8>] (__driver_attach) from [<c020f1b4>] (bus_for_each_dev+0x78/0xc4)
> [<c020f1b4>] (bus_for_each_dev) from [<c0211570>] (driver_attach+0x18/0x24)
> [<c0211570>] (driver_attach) from [<c020fab4>] (bus_add_driver+0x140/0x1cc)
> [<c020fab4>] (bus_add_driver) from [<c0211c44>] (driver_register+0x74/0x114)
> [<c0211c44>] (driver_register) from [<c02134f8>] (__platform_driver_register+0x18/0x24)
> [<c02134f8>] (__platform_driver_register) from [<c0470148>] (ep93xx_adc_driver_init+0x10/0x1c)
> [<c0470148>] (ep93xx_adc_driver_init) from [<c045ce88>] (do_one_initcall+0x7c/0x1a4)
> [<c045ce88>] (do_one_initcall) from [<c045d184>] (kernel_init_freeable+0x17c/0x1fc)
> [<c045d184>] (kernel_init_freeable) from [<c03a64d0>] (kernel_init+0x8/0xf8)
> [<c03a64d0>] (kernel_init) from [<c00082d8>] (ret_from_fork+0x14/0x3c)
> ...
> ep93xx-adc ep93xx-adc: Cannot enable clock
> ep93xx-adc: probe of ep93xx-adc failed with error -108
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

From cover letter I'm assuming you want these to go through same route as
the common clock conversion?  If not shout and I can pick this one up.

Jonathan

> ---
>  drivers/iio/adc/ep93xx_adc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c
> index c08ab3c6dfaf..5c85257b814c 100644
> --- a/drivers/iio/adc/ep93xx_adc.c
> +++ b/drivers/iio/adc/ep93xx_adc.c
> @@ -207,7 +207,7 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
>  		 */
>  	}
>  
> -	ret = clk_enable(priv->clk);
> +	ret = clk_prepare_enable(priv->clk);
>  	if (ret) {
>  		dev_err(&pdev->dev, "Cannot enable clock\n");
>  		return ret;
> @@ -215,7 +215,7 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
>  
>  	ret = iio_device_register(iiodev);
>  	if (ret)
> -		clk_disable(priv->clk);
> +		clk_disable_unprepare(priv->clk);
>  
>  	return ret;
>  }
> @@ -226,7 +226,7 @@ static int ep93xx_adc_remove(struct platform_device *pdev)
>  	struct ep93xx_adc_priv *priv = iio_priv(iiodev);
>  
>  	iio_device_unregister(iiodev);
> -	clk_disable(priv->clk);
> +	clk_disable_unprepare(priv->clk);
>  
>  	return 0;
>  }


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

* Re: [PATCH 1/7] iio: ep93xx: Prepare clock before using it
  2021-06-14 10:50   ` Jonathan Cameron
@ 2021-06-14 10:59     ` Alexander Sverdlin
  2021-08-02  7:30     ` Alexander Sverdlin
  1 sibling, 0 replies; 7+ messages in thread
From: Alexander Sverdlin @ 2021-06-14 10:59 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-iio, Lars-Peter Clausen,
	linux-kernel

Hello Jonathan!

On Mon, 2021-06-14 at 11:50 +0100, Jonathan Cameron wrote:
> > ...
> > ep93xx-adc ep93xx-adc: Cannot enable clock
> > ep93xx-adc: probe of ep93xx-adc failed with error -108
> > 
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> From cover letter I'm assuming you want these to go through same route as
> the common clock conversion?  If not shout and I can pick this one up.

Thank you for the quick reply!
Yes, it makes sense to take the same route as the CCF conversion, I'll try it
first. Maybe I'll need to strip these stacktraces as well, I've
got the whole bunch of complaints on them...

-- 
Alexander Sverdlin.



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

* Re: [PATCH 1/7] iio: ep93xx: Prepare clock before using it
  2021-06-14 10:50   ` Jonathan Cameron
  2021-06-14 10:59     ` Alexander Sverdlin
@ 2021-08-02  7:30     ` Alexander Sverdlin
  2021-08-08 13:58       ` Jonathan Cameron
  1 sibling, 1 reply; 7+ messages in thread
From: Alexander Sverdlin @ 2021-08-02  7:30 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-iio, Lars-Peter Clausen,
	linux-kernel

Hello Jonathan!

On 14/06/2021 12:50, Jonathan Cameron wrote:
> On Mon, 14 Jun 2021 01:30:35 +0200
> Alexander Sverdlin <alexander.sverdlin@gmail.com> wrote:
> 
>> Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
>> to Common Clock Framework, otherwise the following is visible:
>>
>> WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc
>> Enabling unprepared ep93xx-adc
>> CPU: 0 PID: 1 Comm: swapper Not tainted 5.13.0-rc5-... #1
>> Hardware name: Cirrus Logic EDB9302 Evaluation Board
>> [<c000d5b0>] (unwind_backtrace) from [<c000c590>] (show_stack+0x10/0x18)
>> [<c000c590>] (show_stack) from [<c03a5f38>] (dump_stack+0x20/0x2c)
>> [<c03a5f38>] (dump_stack) from [<c03a2098>] (__warn+0x98/0xc0)
>> [<c03a2098>] (__warn) from [<c03a2150>] (warn_slowpath_fmt+0x90/0xc0)
>> [<c03a2150>] (warn_slowpath_fmt) from [<c01d8358>] (clk_core_enable+0x9c/0xbc)
>> [<c01d8358>] (clk_core_enable) from [<c01d8698>] (clk_core_enable_lock+0x18/0x30)
>> [<c01d8698>] (clk_core_enable_lock) from [<c0266560>] (ep93xx_adc_probe+0xe4/0x1a0)
>> [<c0266560>] (ep93xx_adc_probe) from [<c02126e0>] (platform_probe+0x34/0x80)
>> [<c02126e0>] (platform_probe) from [<c0210bf8>] (really_probe+0xe8/0x394)
>> [<c0210bf8>] (really_probe) from [<c0211464>] (device_driver_attach+0x5c/0x64)
>> [<c0211464>] (device_driver_attach) from [<c02114e8>] (__driver_attach+0x7c/0xec)
>> [<c02114e8>] (__driver_attach) from [<c020f1b4>] (bus_for_each_dev+0x78/0xc4)
>> [<c020f1b4>] (bus_for_each_dev) from [<c0211570>] (driver_attach+0x18/0x24)
>> [<c0211570>] (driver_attach) from [<c020fab4>] (bus_add_driver+0x140/0x1cc)
>> [<c020fab4>] (bus_add_driver) from [<c0211c44>] (driver_register+0x74/0x114)
>> [<c0211c44>] (driver_register) from [<c02134f8>] (__platform_driver_register+0x18/0x24)
>> [<c02134f8>] (__platform_driver_register) from [<c0470148>] (ep93xx_adc_driver_init+0x10/0x1c)
>> [<c0470148>] (ep93xx_adc_driver_init) from [<c045ce88>] (do_one_initcall+0x7c/0x1a4)
>> [<c045ce88>] (do_one_initcall) from [<c045d184>] (kernel_init_freeable+0x17c/0x1fc)
>> [<c045d184>] (kernel_init_freeable) from [<c03a64d0>] (kernel_init+0x8/0xf8)
>> [<c03a64d0>] (kernel_init) from [<c00082d8>] (ret_from_fork+0x14/0x3c)
>> ...
>> ep93xx-adc ep93xx-adc: Cannot enable clock
>> ep93xx-adc: probe of ep93xx-adc failed with error -108
>>
>> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> From cover letter I'm assuming you want these to go through same route as
> the common clock conversion?  If not shout and I can pick this one up.

We didn't manage to consolidate the delivery path for this series, could
you please take this patch alone, as you proposed initially?

>> ---
>>  drivers/iio/adc/ep93xx_adc.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c
>> index c08ab3c6dfaf..5c85257b814c 100644
>> --- a/drivers/iio/adc/ep93xx_adc.c
>> +++ b/drivers/iio/adc/ep93xx_adc.c
>> @@ -207,7 +207,7 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
>>  		 */
>>  	}
>>  
>> -	ret = clk_enable(priv->clk);
>> +	ret = clk_prepare_enable(priv->clk);
>>  	if (ret) {
>>  		dev_err(&pdev->dev, "Cannot enable clock\n");
>>  		return ret;
>> @@ -215,7 +215,7 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
>>  
>>  	ret = iio_device_register(iiodev);
>>  	if (ret)
>> -		clk_disable(priv->clk);
>> +		clk_disable_unprepare(priv->clk);
>>  
>>  	return ret;
>>  }
>> @@ -226,7 +226,7 @@ static int ep93xx_adc_remove(struct platform_device *pdev)
>>  	struct ep93xx_adc_priv *priv = iio_priv(iiodev);
>>  
>>  	iio_device_unregister(iiodev);
>> -	clk_disable(priv->clk);
>> +	clk_disable_unprepare(priv->clk);
>>  
>>  	return 0;
>>  }
> 

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

* Re: [PATCH 1/7] iio: ep93xx: Prepare clock before using it
  2021-08-02  7:30     ` Alexander Sverdlin
@ 2021-08-08 13:58       ` Jonathan Cameron
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2021-08-08 13:58 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-iio, Lars-Peter Clausen,
	linux-kernel

On Mon, 2 Aug 2021 09:30:23 +0200
Alexander Sverdlin <alexander.sverdlin@gmail.com> wrote:

> Hello Jonathan!
> 
> On 14/06/2021 12:50, Jonathan Cameron wrote:
> > On Mon, 14 Jun 2021 01:30:35 +0200
> > Alexander Sverdlin <alexander.sverdlin@gmail.com> wrote:
> >   
> >> Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> >> to Common Clock Framework, otherwise the following is visible:
> >>
> >> WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc
> >> Enabling unprepared ep93xx-adc
> >> CPU: 0 PID: 1 Comm: swapper Not tainted 5.13.0-rc5-... #1
> >> Hardware name: Cirrus Logic EDB9302 Evaluation Board
> >> [<c000d5b0>] (unwind_backtrace) from [<c000c590>] (show_stack+0x10/0x18)
> >> [<c000c590>] (show_stack) from [<c03a5f38>] (dump_stack+0x20/0x2c)
> >> [<c03a5f38>] (dump_stack) from [<c03a2098>] (__warn+0x98/0xc0)
> >> [<c03a2098>] (__warn) from [<c03a2150>] (warn_slowpath_fmt+0x90/0xc0)
> >> [<c03a2150>] (warn_slowpath_fmt) from [<c01d8358>] (clk_core_enable+0x9c/0xbc)
> >> [<c01d8358>] (clk_core_enable) from [<c01d8698>] (clk_core_enable_lock+0x18/0x30)
> >> [<c01d8698>] (clk_core_enable_lock) from [<c0266560>] (ep93xx_adc_probe+0xe4/0x1a0)
> >> [<c0266560>] (ep93xx_adc_probe) from [<c02126e0>] (platform_probe+0x34/0x80)
> >> [<c02126e0>] (platform_probe) from [<c0210bf8>] (really_probe+0xe8/0x394)
> >> [<c0210bf8>] (really_probe) from [<c0211464>] (device_driver_attach+0x5c/0x64)
> >> [<c0211464>] (device_driver_attach) from [<c02114e8>] (__driver_attach+0x7c/0xec)
> >> [<c02114e8>] (__driver_attach) from [<c020f1b4>] (bus_for_each_dev+0x78/0xc4)
> >> [<c020f1b4>] (bus_for_each_dev) from [<c0211570>] (driver_attach+0x18/0x24)
> >> [<c0211570>] (driver_attach) from [<c020fab4>] (bus_add_driver+0x140/0x1cc)
> >> [<c020fab4>] (bus_add_driver) from [<c0211c44>] (driver_register+0x74/0x114)
> >> [<c0211c44>] (driver_register) from [<c02134f8>] (__platform_driver_register+0x18/0x24)
> >> [<c02134f8>] (__platform_driver_register) from [<c0470148>] (ep93xx_adc_driver_init+0x10/0x1c)
> >> [<c0470148>] (ep93xx_adc_driver_init) from [<c045ce88>] (do_one_initcall+0x7c/0x1a4)
> >> [<c045ce88>] (do_one_initcall) from [<c045d184>] (kernel_init_freeable+0x17c/0x1fc)
> >> [<c045d184>] (kernel_init_freeable) from [<c03a64d0>] (kernel_init+0x8/0xf8)
> >> [<c03a64d0>] (kernel_init) from [<c00082d8>] (ret_from_fork+0x14/0x3c)
> >> ...
> >> ep93xx-adc ep93xx-adc: Cannot enable clock
> >> ep93xx-adc: probe of ep93xx-adc failed with error -108
> >>
> >> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>  
> > Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > From cover letter I'm assuming you want these to go through same route as
> > the common clock conversion?  If not shout and I can pick this one up.  
> 
> We didn't manage to consolidate the delivery path for this series, could
> you please take this patch alone, as you proposed initially?

Sure. Applied to the togreg branch of iio.git and pushed out as testing for
0-day to see if it can find anything we missed.

Thanks,

Jonathan
> 
> >> ---
> >>  drivers/iio/adc/ep93xx_adc.c | 6 +++---
> >>  1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c
> >> index c08ab3c6dfaf..5c85257b814c 100644
> >> --- a/drivers/iio/adc/ep93xx_adc.c
> >> +++ b/drivers/iio/adc/ep93xx_adc.c
> >> @@ -207,7 +207,7 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
> >>  		 */
> >>  	}
> >>  
> >> -	ret = clk_enable(priv->clk);
> >> +	ret = clk_prepare_enable(priv->clk);
> >>  	if (ret) {
> >>  		dev_err(&pdev->dev, "Cannot enable clock\n");
> >>  		return ret;
> >> @@ -215,7 +215,7 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
> >>  
> >>  	ret = iio_device_register(iiodev);
> >>  	if (ret)
> >> -		clk_disable(priv->clk);
> >> +		clk_disable_unprepare(priv->clk);
> >>  
> >>  	return ret;
> >>  }
> >> @@ -226,7 +226,7 @@ static int ep93xx_adc_remove(struct platform_device *pdev)
> >>  	struct ep93xx_adc_priv *priv = iio_priv(iiodev);
> >>  
> >>  	iio_device_unregister(iiodev);
> >> -	clk_disable(priv->clk);
> >> +	clk_disable_unprepare(priv->clk);
> >>  
> >>  	return 0;
> >>  }  
> >   


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

end of thread, other threads:[~2021-08-08 13:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-13 23:30 [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Alexander Sverdlin
2021-06-13 23:30 ` [PATCH 1/7] iio: ep93xx: Prepare clock before using it Alexander Sverdlin
2021-06-14 10:50   ` Jonathan Cameron
2021-06-14 10:59     ` Alexander Sverdlin
2021-08-02  7:30     ` Alexander Sverdlin
2021-08-08 13:58       ` Jonathan Cameron
2021-06-14  7:15 ` [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).