linux-fbdev.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 4/7] video: 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; 3+ 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] 3+ messages in thread

* [PATCH 4/7] video: 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  7:15 ` [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Uwe Kleine-König
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Sverdlin @ 2021-06-13 23:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, Nikita Shubin, linux-fbdev
  Cc: Alexander Sverdlin, linux-kernel, dri-devel

Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
to Common Clock Framework.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 drivers/video/fbdev/ep93xx-fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/ep93xx-fb.c b/drivers/video/fbdev/ep93xx-fb.c
index ba33b4dce0df..2398b3d48fed 100644
--- a/drivers/video/fbdev/ep93xx-fb.c
+++ b/drivers/video/fbdev/ep93xx-fb.c
@@ -548,7 +548,7 @@ static int ep93xxfb_probe(struct platform_device *pdev)
 	}
 
 	ep93xxfb_set_par(info);
-	clk_enable(fbi->clk);
+	clk_prepare_enable(fbi->clk);
 
 	err = register_framebuffer(info);
 	if (err)
@@ -577,7 +577,7 @@ static int ep93xxfb_remove(struct platform_device *pdev)
 	struct ep93xx_fbi *fbi = info->par;
 
 	unregister_framebuffer(info);
-	clk_disable(fbi->clk);
+	clk_disable_unprepare(fbi->clk);
 	ep93xxfb_dealloc_videomem(info);
 	fb_dealloc_cmap(&info->cmap);
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ 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 4/7] video: ep93xx: Prepare clock before using it Alexander Sverdlin
@ 2021-06-14  7:15 ` Uwe Kleine-König
  1 sibling, 0 replies; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2021-06-14  7:16 UTC | newest]

Thread overview: 3+ 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 4/7] video: 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

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).