LKML Archive on lore.kernel.org
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
                   ` (7 more replies)
  0 siblings, 8 replies; 27+ 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] 27+ 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-13 23:30 ` [PATCH 2/7] spi: spi-ep93xx: " Alexander Sverdlin
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 27+ 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	[flat|nested] 27+ messages in thread

* [PATCH 2/7] spi: spi-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 ` [PATCH 1/7] iio: ep93xx: Prepare clock before using it Alexander Sverdlin
@ 2021-06-13 23:30 ` Alexander Sverdlin
  2021-06-14 10:34   ` Mark Brown
  2021-06-13 23:30 ` [PATCH 3/7] Input: ep93xx_keypad: " Alexander Sverdlin
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 27+ messages in thread
From: Alexander Sverdlin @ 2021-06-13 23:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, Nikita Shubin, linux-spi
  Cc: Alexander Sverdlin, Mark Brown, 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-spi.0
CPU: 0 PID: 1 Comm: swapper Tainted: G        W         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 [<c023eeb4>] (ep93xx_spi_prepare_hardware+0x10/0x30)
[<c023eeb4>] (ep93xx_spi_prepare_hardware) from [<c023c0f8>] (__spi_pump_messages+0x124/0x620)
[<c023c0f8>] (__spi_pump_messages) from [<c023e5b8>] (__spi_sync+0x280/0x2c0)
[<c023e5b8>] (__spi_sync) from [<c023e61c>] (spi_sync+0x24/0x40)
[<c023e61c>] (spi_sync) from [<c021f8a4>] (spi_sync_transfer.constprop.0+0x64/0x8c)
[<c021f8a4>] (spi_sync_transfer.constprop.0) from [<c021f914>] (regmap_spi_write+0x48/0x70)
[<c021f914>] (regmap_spi_write) from [<c021c320>] (_regmap_raw_write_impl+0x640/0x740)
[<c021c320>] (_regmap_raw_write_impl) from [<c021c49c>] (_regmap_bus_raw_write+0x7c/0xac)
[<c021c49c>] (_regmap_bus_raw_write) from [<c021bbd4>] (_regmap_update_bits+0xec/0xf8)
[<c021bbd4>] (_regmap_update_bits) from [<c021dac4>] (regmap_update_bits_base+0x50/0x7c)
[<c021dac4>] (regmap_update_bits_base) from [<c0290ea8>] (cs4271_component_probe+0x74/0x148)
[<c0290ea8>] (cs4271_component_probe) from [<c02889b4>] (snd_soc_component_probe+0x24/0x74)
[<c02889b4>] (snd_soc_component_probe) from [<c027e9d0>] (soc_probe_component+0x11c/0x29c)
[<c027e9d0>] (soc_probe_component) from [<c027ef14>] (snd_soc_bind_card+0x3c4/0x8a8)
[<c027ef14>] (snd_soc_bind_card) from [<c0291798>] (edb93xx_probe+0x34/0x5c)
[<c0291798>] (edb93xx_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 [<c047084c>] (edb93xx_driver_init+0x10/0x1c)
[<c047084c>] (edb93xx_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)
...
spi_master spi0: failed to prepare transfer hardware: -108

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

diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index aa676559d273..5896a7b2fade 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -550,7 +550,7 @@ static int ep93xx_spi_prepare_hardware(struct spi_master *master)
 	u32 val;
 	int ret;
 
-	ret = clk_enable(espi->clk);
+	ret = clk_prepare_enable(espi->clk);
 	if (ret)
 		return ret;
 
@@ -570,7 +570,7 @@ static int ep93xx_spi_unprepare_hardware(struct spi_master *master)
 	val &= ~SSPCR1_SSE;
 	writel(val, espi->mmio + SSPCR1);
 
-	clk_disable(espi->clk);
+	clk_disable_unprepare(espi->clk);
 
 	return 0;
 }
-- 
2.32.0


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

* [PATCH 3/7] Input: ep93xx_keypad: 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 ` [PATCH 1/7] iio: ep93xx: Prepare clock before using it Alexander Sverdlin
  2021-06-13 23:30 ` [PATCH 2/7] spi: spi-ep93xx: " Alexander Sverdlin
@ 2021-06-13 23:30 ` Alexander Sverdlin
  2021-06-14 21:55   ` Dmitry Torokhov
  2021-06-13 23:30 ` [PATCH 4/7] video: ep93xx: " Alexander Sverdlin
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 27+ messages in thread
From: Alexander Sverdlin @ 2021-06-13 23:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, Nikita Shubin, linux-input
  Cc: Alexander Sverdlin, Dmitry Torokhov, linux-kernel

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/input/keyboard/ep93xx_keypad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
index c8194333d612..e0e931e796fa 100644
--- a/drivers/input/keyboard/ep93xx_keypad.c
+++ b/drivers/input/keyboard/ep93xx_keypad.c
@@ -157,7 +157,7 @@ static int ep93xx_keypad_open(struct input_dev *pdev)
 
 	if (!keypad->enabled) {
 		ep93xx_keypad_config(keypad);
-		clk_enable(keypad->clk);
+		clk_prepare_enable(keypad->clk);
 		keypad->enabled = true;
 	}
 
@@ -169,7 +169,7 @@ static void ep93xx_keypad_close(struct input_dev *pdev)
 	struct ep93xx_keypad *keypad = input_get_drvdata(pdev);
 
 	if (keypad->enabled) {
-		clk_disable(keypad->clk);
+		clk_disable_unprepare(keypad->clk);
 		keypad->enabled = false;
 	}
 }
-- 
2.32.0


^ permalink raw reply	[flat|nested] 27+ 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
                   ` (2 preceding siblings ...)
  2021-06-13 23:30 ` [PATCH 3/7] Input: ep93xx_keypad: " Alexander Sverdlin
@ 2021-06-13 23:30 ` Alexander Sverdlin
  2021-06-13 23:30 ` [PATCH 5/7] dmaengine: " Alexander Sverdlin
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 27+ 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	[flat|nested] 27+ messages in thread

* [PATCH 5/7] dmaengine: ep93xx: Prepare clock before using it
  2021-06-13 23:30 [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Alexander Sverdlin
                   ` (3 preceding siblings ...)
  2021-06-13 23:30 ` [PATCH 4/7] video: ep93xx: " Alexander Sverdlin
@ 2021-06-13 23:30 ` Alexander Sverdlin
  2021-06-13 23:30 ` [PATCH 6/7] ASoC: cirrus: i2s: " Alexander Sverdlin
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 27+ messages in thread
From: Alexander Sverdlin @ 2021-06-13 23:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, Nikita Shubin, dmaengine
  Cc: Alexander Sverdlin, Vinod Koul, 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 m2p0
CPU: 0 PID: 1 Comm: swapper Not tainted 5.13.0-rc5-tekon #1
Hardware name: Cirrus Logic EDB9302 Evaluation Board
[<c000d5b0>] (unwind_backtrace) from [<c000c590>] (show_stack+0x10/0x18)
[<c000c590>] (show_stack) from [<c03a5fb8>] (dump_stack+0x20/0x2c)
[<c03a5fb8>] (dump_stack) from [<c03a2118>] (__warn+0x98/0xc0)
[<c03a2118>] (__warn) from [<c03a21d0>] (warn_slowpath_fmt+0x90/0xc0)
[<c03a21d0>] (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 [<c01e1844>] (ep93xx_dma_alloc_chan_resources+0x94/0x244)
[<c01e1844>] (ep93xx_dma_alloc_chan_resources) from [<c01df7d4>] (dma_chan_get+0x90/0x124)
[<c01df7d4>] (dma_chan_get) from [<c01df92c>] (find_candidate+0xc4/0x188)
[<c01df92c>] (find_candidate) from [<c01dff30>] (__dma_request_channel+0x68/0xb0)
[<c01dff30>] (__dma_request_channel) from [<c027d2e4>] (snd_dmaengine_pcm_request_channel+0x68/0x90)
[<c027d2e4>] (snd_dmaengine_pcm_request_channel) from [<c0290618>] (dmaengine_pcm_new+0x254/0x29c)
[<c0290618>] (dmaengine_pcm_new) from [<c0289b84>] (snd_soc_pcm_component_new+0x40/0xa0)
[<c0289b84>] (snd_soc_pcm_component_new) from [<c028c7f8>] (soc_new_pcm+0x47c/0x5fc)
[<c028c7f8>] (soc_new_pcm) from [<c027f300>] (snd_soc_bind_card+0x73c/0x8a8)
[<c027f300>] (snd_soc_bind_card) from [<c029180c>] (edb93xx_probe+0x34/0x5c)
[<c029180c>] (edb93xx_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 [<c047084c>] (edb93xx_driver_init+0x10/0x1c)
[<c047084c>] (edb93xx_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 [<c03a6550>] (kernel_init+0x8/0xf8)
[<c03a6550>] (kernel_init) from [<c00082d8>] (ret_from_fork+0x14/0x3c)
...
ep93xx-i2s ep93xx-i2s: Missing dma channel for stream: 0
ep93xx-i2s ep93xx-i2s: ASoC: error at snd_soc_pcm_component_new on ep93xx-i2s: -22
edb93xx-audio edb93xx-audio: ASoC: can't create pcm CS4271 HiFi :-22
edb93xx-audio edb93xx-audio: snd_soc_register_card() failed: -22
edb93xx-audio: probe of edb93xx-audio failed with error -22

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

diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index 01027779beb8..98f9ee70362e 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -897,7 +897,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
 	if (data && data->name)
 		name = data->name;
 
-	ret = clk_enable(edmac->clk);
+	ret = clk_prepare_enable(edmac->clk);
 	if (ret)
 		return ret;
 
@@ -936,7 +936,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
 fail_free_irq:
 	free_irq(edmac->irq, edmac);
 fail_clk_disable:
-	clk_disable(edmac->clk);
+	clk_disable_unprepare(edmac->clk);
 
 	return ret;
 }
@@ -969,7 +969,7 @@ static void ep93xx_dma_free_chan_resources(struct dma_chan *chan)
 	list_for_each_entry_safe(desc, d, &list, node)
 		kfree(desc);
 
-	clk_disable(edmac->clk);
+	clk_disable_unprepare(edmac->clk);
 	free_irq(edmac->irq, edmac);
 }
 
-- 
2.32.0


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

* [PATCH 6/7] ASoC: cirrus: i2s: Prepare clock before using it
  2021-06-13 23:30 [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Alexander Sverdlin
                   ` (4 preceding siblings ...)
  2021-06-13 23:30 ` [PATCH 5/7] dmaengine: " Alexander Sverdlin
@ 2021-06-13 23:30 ` Alexander Sverdlin
  2021-06-13 23:30 ` [PATCH 7/7] pwm: ep93xx: " Alexander Sverdlin
  2021-06-14  7:15 ` [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Uwe Kleine-König
  7 siblings, 0 replies; 27+ messages in thread
From: Alexander Sverdlin @ 2021-06-13 23:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, Nikita Shubin, alsa-devel
  Cc: Alexander Sverdlin, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	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: 97 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc
Enabling unprepared mclk
CPU: 0 PID: 97 Comm: OPAL-Event:97 Not tainted 5.13.0-rc5-tekon #1
Hardware name: Cirrus Logic EDB9302 Evaluation Board
[<c000d5b0>] (unwind_backtrace) from [<c000c590>] (show_stack+0x10/0x18)
[<c000c590>] (show_stack) from [<c03a5fd8>] (dump_stack+0x20/0x2c)
[<c03a5fd8>] (dump_stack) from [<c03a2138>] (__warn+0x98/0xc0)
[<c03a2138>] (__warn) from [<c03a21f0>] (warn_slowpath_fmt+0x90/0xc0)
[<c03a21f0>] (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 [<c0291568>] (ep93xx_i2s_hw_params+0x1a0/0x1c0)
[<c0291568>] (ep93xx_i2s_hw_params) from [<c0287488>] (snd_soc_dai_hw_params+0x54/0xb4)
[<c0287488>] (snd_soc_dai_hw_params) from [<c028b0a4>] (soc_pcm_hw_params+0x418/0x5bc)
[<c028b0a4>] (soc_pcm_hw_params) from [<c0275608>] (snd_pcm_hw_params+0x14c/0x448)
[<c0275608>] (snd_pcm_hw_params) from [<c02761ac>] (snd_pcm_ioctl+0x258/0x1114)
[<c02761ac>] (snd_pcm_ioctl) from [<c00e6d40>] (sys_ioctl+0x290/0xbc4)
[<c00e6d40>] (sys_ioctl) from [<c0008200>] (ret_fast_syscall+0x0/0x4c)

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 sound/soc/cirrus/ep93xx-i2s.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
index 0d26550d0df8..4d3179f03202 100644
--- a/sound/soc/cirrus/ep93xx-i2s.c
+++ b/sound/soc/cirrus/ep93xx-i2s.c
@@ -111,9 +111,9 @@ static void ep93xx_i2s_enable(struct ep93xx_i2s_info *info, int stream)
 	if ((ep93xx_i2s_read_reg(info, EP93XX_I2S_TX0EN) & 0x1) == 0 &&
 	    (ep93xx_i2s_read_reg(info, EP93XX_I2S_RX0EN) & 0x1) == 0) {
 		/* Enable clocks */
-		clk_enable(info->mclk);
-		clk_enable(info->sclk);
-		clk_enable(info->lrclk);
+		clk_prepare_enable(info->mclk);
+		clk_prepare_enable(info->sclk);
+		clk_prepare_enable(info->lrclk);
 
 		/* Enable i2s */
 		ep93xx_i2s_write_reg(info, EP93XX_I2S_GLCTRL, 1);
@@ -156,9 +156,9 @@ static void ep93xx_i2s_disable(struct ep93xx_i2s_info *info, int stream)
 		ep93xx_i2s_write_reg(info, EP93XX_I2S_GLCTRL, 0);
 
 		/* Disable clocks */
-		clk_disable(info->lrclk);
-		clk_disable(info->sclk);
-		clk_disable(info->mclk);
+		clk_disable_unprepare(info->lrclk);
+		clk_disable_unprepare(info->sclk);
+		clk_disable_unprepare(info->mclk);
 	}
 }
 
-- 
2.32.0


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

* [PATCH 7/7] pwm: ep93xx: Prepare clock before using it
  2021-06-13 23:30 [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Alexander Sverdlin
                   ` (5 preceding siblings ...)
  2021-06-13 23:30 ` [PATCH 6/7] ASoC: cirrus: i2s: " Alexander Sverdlin
@ 2021-06-13 23:30 ` Alexander Sverdlin
  2021-06-14  7:22   ` Uwe Kleine-König
  2021-06-14  7:15 ` [PATCH 0/7] Prepare EP93xx drivers for Common Clock Framework Uwe Kleine-König
  7 siblings, 1 reply; 27+ messages in thread
From: Alexander Sverdlin @ 2021-06-13 23:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, Nikita Shubin, linux-pwm
  Cc: Alexander Sverdlin, Thierry Reding, Uwe Kleine-König,
	Lee Jones, linux-kernel

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/pwm/pwm-ep93xx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pwm/pwm-ep93xx.c b/drivers/pwm/pwm-ep93xx.c
index 4ca70794ad96..8c0d4d69d9e6 100644
--- a/drivers/pwm/pwm-ep93xx.c
+++ b/drivers/pwm/pwm-ep93xx.c
@@ -74,7 +74,7 @@ static int ep93xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	 * Configuration can be changed at any time.
 	 */
 	if (!pwm_is_enabled(pwm)) {
-		ret = clk_enable(ep93xx_pwm->clk);
+		ret = clk_prepare_enable(ep93xx_pwm->clk);
 		if (ret)
 			return ret;
 	}
@@ -105,7 +105,7 @@ static int ep93xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	}
 
 	if (!pwm_is_enabled(pwm))
-		clk_disable(ep93xx_pwm->clk);
+		clk_disable_unprepare(ep93xx_pwm->clk);
 
 	return ret;
 }
@@ -120,7 +120,7 @@ static int ep93xx_pwm_polarity(struct pwm_chip *chip, struct pwm_device *pwm,
 	 * The clock needs to be enabled to access the PWM registers.
 	 * Polarity can only be changed when the PWM is disabled.
 	 */
-	ret = clk_enable(ep93xx_pwm->clk);
+	ret = clk_prepare_enable(ep93xx_pwm->clk);
 	if (ret)
 		return ret;
 
@@ -129,7 +129,7 @@ static int ep93xx_pwm_polarity(struct pwm_chip *chip, struct pwm_device *pwm,
 	else
 		writew(0x0, ep93xx_pwm->base + EP93XX_PWMx_INVERT);
 
-	clk_disable(ep93xx_pwm->clk);
+	clk_disable_unprepare(ep93xx_pwm->clk);
 
 	return 0;
 }
@@ -139,7 +139,7 @@ static int ep93xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
 	struct ep93xx_pwm *ep93xx_pwm = to_ep93xx_pwm(chip);
 	int ret;
 
-	ret = clk_enable(ep93xx_pwm->clk);
+	ret = clk_prepare_enable(ep93xx_pwm->clk);
 	if (ret)
 		return ret;
 
@@ -153,7 +153,7 @@ static void ep93xx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
 	struct ep93xx_pwm *ep93xx_pwm = to_ep93xx_pwm(chip);
 
 	writew(0x0, ep93xx_pwm->base + EP93XX_PWMx_ENABLE);
-	clk_disable(ep93xx_pwm->clk);
+	clk_disable_unprepare(ep93xx_pwm->clk);
 }
 
 static const struct pwm_ops ep93xx_pwm_ops = {
-- 
2.32.0


^ permalink raw reply	[flat|nested] 27+ 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
                   ` (6 preceding siblings ...)
  2021-06-13 23:30 ` [PATCH 7/7] pwm: ep93xx: " Alexander Sverdlin
@ 2021-06-14  7:15 ` Uwe Kleine-König
  7 siblings, 0 replies; 27+ 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] 27+ messages in thread

* Re: [PATCH 7/7] pwm: ep93xx: Prepare clock before using it
  2021-06-13 23:30 ` [PATCH 7/7] pwm: ep93xx: " Alexander Sverdlin
@ 2021-06-14  7:22   ` Uwe Kleine-König
  2021-06-14  7:30     ` Alexander Sverdlin
  2021-09-13 21:46     ` Alexander Sverdlin
  0 siblings, 2 replies; 27+ messages in thread
From: Uwe Kleine-König @ 2021-06-14  7:22 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-pwm, Thierry Reding,
	Lee Jones, linux-kernel, kernel, H Hartley Sweeten

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

On Mon, Jun 14, 2021 at 01:30:41AM +0200, Alexander Sverdlin wrote:
> Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> to Common Clock Framework.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

Maybe it would make sense to move the prepare into the probe function?!
Anyhow, for now preparing the driver for the common-clk switch is the
focus and for that the conversion is correct, so:

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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] 27+ messages in thread

* Re: [PATCH 7/7] pwm: ep93xx: Prepare clock before using it
  2021-06-14  7:22   ` Uwe Kleine-König
@ 2021-06-14  7:30     ` Alexander Sverdlin
  2021-09-13 21:46     ` Alexander Sverdlin
  1 sibling, 0 replies; 27+ messages in thread
From: Alexander Sverdlin @ 2021-06-14  7:30 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-pwm, Thierry Reding,
	Lee Jones, linux-kernel, kernel, H Hartley Sweeten

Hi Uwe!

On Mon, 2021-06-14 at 09:22 +0200, Uwe Kleine-König wrote:
> > Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> > to Common Clock Framework.
> > 
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> 
> Maybe it would make sense to move the prepare into the probe function?!

If one thinks about real meaningful clk_prepare(), not like in EP93xx,
then clk_is_enabled_when_prepared() shall be considered and this might
change behaviour. That's why this "stupid" approach was chosen for this
conversion. Also, unfortunately, I don't have a test setup for PWM, this
made me shy towards this driver ;)

-- 
Alexander Sverdlin.



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

* Re: [PATCH 2/7] spi: spi-ep93xx: Prepare clock before using it
  2021-06-13 23:30 ` [PATCH 2/7] spi: spi-ep93xx: " Alexander Sverdlin
@ 2021-06-14 10:34   ` Mark Brown
  0 siblings, 0 replies; 27+ messages in thread
From: Mark Brown @ 2021-06-14 10:34 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-spi, linux-kernel

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

On Mon, Jun 14, 2021 at 01:30:36AM +0200, Alexander Sverdlin 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-spi.0
> CPU: 0 PID: 1 Comm: swapper Tainted: G        W         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 [<c023eeb4>] (ep93xx_spi_prepare_hardware+0x10/0x30)

Please think hard before including complete backtraces in upstream
reports, they are very large and contain almost no useful information
relative to their size so often obscure the relevant content in your
message. If part of the backtrace is usefully illustrative (it often is
for search engines if nothing else) then it's usually better to pull out
the relevant sections.

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

^ permalink raw reply	[flat|nested] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ messages in thread

* Re: [PATCH 3/7] Input: ep93xx_keypad: Prepare clock before using it
  2021-06-13 23:30 ` [PATCH 3/7] Input: ep93xx_keypad: " Alexander Sverdlin
@ 2021-06-14 21:55   ` Dmitry Torokhov
  2021-06-15  7:46     ` Alexander Sverdlin
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Torokhov @ 2021-06-14 21:55 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-input, linux-kernel

Hi Alexander,

On Mon, Jun 14, 2021 at 01:30:37AM +0200, Alexander Sverdlin wrote:
> Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> to Common Clock Framework.

Can this be merged standalone?

> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
>  drivers/input/keyboard/ep93xx_keypad.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
> index c8194333d612..e0e931e796fa 100644
> --- a/drivers/input/keyboard/ep93xx_keypad.c
> +++ b/drivers/input/keyboard/ep93xx_keypad.c
> @@ -157,7 +157,7 @@ static int ep93xx_keypad_open(struct input_dev *pdev)
>  
>  	if (!keypad->enabled) {
>  		ep93xx_keypad_config(keypad);
> -		clk_enable(keypad->clk);
> +		clk_prepare_enable(keypad->clk);
>  		keypad->enabled = true;
>  	}
>  
> @@ -169,7 +169,7 @@ static void ep93xx_keypad_close(struct input_dev *pdev)
>  	struct ep93xx_keypad *keypad = input_get_drvdata(pdev);
>  
>  	if (keypad->enabled) {
> -		clk_disable(keypad->clk);
> +		clk_disable_unprepare(keypad->clk);
>  		keypad->enabled = false;

While we are at it, I wonder about handling suspend/resume. I see that
we disable the clock even if keyboard is configured as a wakeup source.
Is it really capable of waking up the system when clock is off?

Thanks.

-- 
Dmitry

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

* Re: [PATCH 3/7] Input: ep93xx_keypad: Prepare clock before using it
  2021-06-14 21:55   ` Dmitry Torokhov
@ 2021-06-15  7:46     ` Alexander Sverdlin
  2021-06-20  3:23       ` Dmitry Torokhov
  0 siblings, 1 reply; 27+ messages in thread
From: Alexander Sverdlin @ 2021-06-15  7:46 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-input, linux-kernel

Hello Dmitry!

On Mon, 2021-06-14 at 14:55 -0700, Dmitry Torokhov wrote:
> > Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> > to Common Clock Framework.
> 
> Can this be merged standalone?

In principle, yes, but I thought it would be easier if the patches
would go via the same path as CCF conversion.

> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> > ---
> >   drivers/input/keyboard/ep93xx_keypad.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
> > index c8194333d612..e0e931e796fa 100644
> > --- a/drivers/input/keyboard/ep93xx_keypad.c
> > +++ b/drivers/input/keyboard/ep93xx_keypad.c
> > @@ -157,7 +157,7 @@ static int ep93xx_keypad_open(struct input_dev *pdev)
> >   
> >         if (!keypad->enabled) {
> >                 ep93xx_keypad_config(keypad);
> > -               clk_enable(keypad->clk);
> > +               clk_prepare_enable(keypad->clk);
> >                 keypad->enabled = true;
> >         }
> >   
> > @@ -169,7 +169,7 @@ static void ep93xx_keypad_close(struct input_dev *pdev)
> >         struct ep93xx_keypad *keypad = input_get_drvdata(pdev);
> >   
> >         if (keypad->enabled) {
> > -               clk_disable(keypad->clk);
> > +               clk_disable_unprepare(keypad->clk);
> >                 keypad->enabled = false;
> 
> While we are at it, I wonder about handling suspend/resume. I see that
> we disable the clock even if keyboard is configured as a wakeup source.
> Is it really capable of waking up the system when clock is off?

That what "EP93xx User’s Guide" says:

26.2.4 Low Power Mode
The key scanning block also supports a low power wake-up mode. In this mode, a key press
generates a wake up interrupt. The key scan interrupt should be masked. Because the wake
up interrupt is asynchronous, and depends on external keypad lines which may have a large
capacitance value, glitches may occur on the interrupt when transitioning to low power mode.
After transitioning, all clocks to the key scanning circuitry can be shut down.

-- 
Alexander Sverdlin.



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

* Re: [PATCH 3/7] Input: ep93xx_keypad: Prepare clock before using it
  2021-06-15  7:46     ` Alexander Sverdlin
@ 2021-06-20  3:23       ` Dmitry Torokhov
  2021-08-02  7:28         ` Alexander Sverdlin
  2021-09-13 21:29         ` Alexander Sverdlin
  0 siblings, 2 replies; 27+ messages in thread
From: Dmitry Torokhov @ 2021-06-20  3:23 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-input, linux-kernel

On Tue, Jun 15, 2021 at 09:46:51AM +0200, Alexander Sverdlin wrote:
> Hello Dmitry!
> 
> On Mon, 2021-06-14 at 14:55 -0700, Dmitry Torokhov wrote:
> > > Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> > > to Common Clock Framework.
> > 
> > Can this be merged standalone?
> 
> In principle, yes, but I thought it would be easier if the patches
> would go via the same path as CCF conversion.

OK, in this case:

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

-- 
Dmitry

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

* Re: [PATCH 3/7] Input: ep93xx_keypad: Prepare clock before using it
  2021-06-20  3:23       ` Dmitry Torokhov
@ 2021-08-02  7:28         ` Alexander Sverdlin
  2021-09-13 21:29         ` Alexander Sverdlin
  1 sibling, 0 replies; 27+ messages in thread
From: Alexander Sverdlin @ 2021-08-02  7:28 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-input, linux-kernel

Hello Dmitry!

On 20/06/2021 05:23, Dmitry Torokhov wrote:
>>>> Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
>>>> to Common Clock Framework.
>>>
>>> Can this be merged standalone?
>>
>> In principle, yes, but I thought it would be easier if the patches
>> would go via the same path as CCF conversion.
> 
> OK, in this case:
> 
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Seems that this doesn't work as we planned and two patches of the series
were already taken in by the respective maintainers.
Could you please apply this patch as well to your tree?

--
Alex.

^ permalink raw reply	[flat|nested] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ messages in thread

* Re: [PATCH 3/7] Input: ep93xx_keypad: Prepare clock before using it
  2021-06-20  3:23       ` Dmitry Torokhov
  2021-08-02  7:28         ` Alexander Sverdlin
@ 2021-09-13 21:29         ` Alexander Sverdlin
  2021-10-12  1:43           ` Dmitry Torokhov
  1 sibling, 1 reply; 27+ messages in thread
From: Alexander Sverdlin @ 2021-09-13 21:29 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-input, linux-kernel

Hello Dmitry,

On Sat, 2021-06-19 at 20:23 -0700, Dmitry Torokhov wrote:
> > On Mon, 2021-06-14 at 14:55 -0700, Dmitry Torokhov wrote:
> > > > Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> > > > to Common Clock Framework.
> > > 
> > > Can this be merged standalone?
> > 
> > In principle, yes, but I thought it would be easier if the patches
> > would go via the same path as CCF conversion.
> 
> OK, in this case:
> 
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

our initial attempt to find a maintainer for the whole series
didn't work out. Would you take this single patch, please?
Three others were already taken into respective subsystems
and I'll ping the rest of maintainers individually...

-- 
Alexander Sverdlin.



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

* Re: [PATCH 7/7] pwm: ep93xx: Prepare clock before using it
  2021-06-14  7:22   ` Uwe Kleine-König
  2021-06-14  7:30     ` Alexander Sverdlin
@ 2021-09-13 21:46     ` Alexander Sverdlin
  2021-09-14  7:58       ` Uwe Kleine-König
  1 sibling, 1 reply; 27+ messages in thread
From: Alexander Sverdlin @ 2021-09-13 21:46 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-pwm, Thierry Reding,
	Lee Jones, linux-kernel, kernel, H Hartley Sweeten

Hello Thierry,

On Mon, 2021-06-14 at 09:22 +0200, Uwe Kleine-König wrote:
> On Mon, Jun 14, 2021 at 01:30:41AM +0200, Alexander Sverdlin wrote:
> > Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> > to Common Clock Framework.
> > 
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> 
> Maybe it would make sense to move the prepare into the probe function?!
> Anyhow, for now preparing the driver for the common-clk switch is the
> focus and for that the conversion is correct, so:
> 
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

would you take this patch only, please?
It didn't work out to sell the whole series as one piece and
most of them were taken individually...

-- 
Alexander Sverdlin.



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

* Re: [PATCH 7/7] pwm: ep93xx: Prepare clock before using it
  2021-09-13 21:46     ` Alexander Sverdlin
@ 2021-09-14  7:58       ` Uwe Kleine-König
  2021-09-14 10:15         ` Alexander Sverdlin
  0 siblings, 1 reply; 27+ messages in thread
From: Uwe Kleine-König @ 2021-09-14  7:58 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: linux-pwm, Nikita Shubin, linux-kernel, H Hartley Sweeten,
	Thierry Reding, Geert Uytterhoeven, kernel, Lee Jones

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

On Mon, Sep 13, 2021 at 11:46:41PM +0200, Alexander Sverdlin wrote:
> Hello Thierry,
> 
> On Mon, 2021-06-14 at 09:22 +0200, Uwe Kleine-König wrote:
> > On Mon, Jun 14, 2021 at 01:30:41AM +0200, Alexander Sverdlin wrote:
> > > Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> > > to Common Clock Framework.
> > > 
> > > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> > 
> > Maybe it would make sense to move the prepare into the probe function?!
> > Anyhow, for now preparing the driver for the common-clk switch is the
> > focus and for that the conversion is correct, so:
> > 
> > Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> would you take this patch only, please?
> It didn't work out to sell the whole series as one piece and
> most of them were taken individually...

Hmm, this patch is marked as accepted in patchwork
(http://patchwork.ozlabs.org/project/linux-pwm/patch/20210613233041.128961-8-alexander.sverdlin@gmail.com/).
There is also a v2, that is also marked as accepted
(http://patchwork.ozlabs.org/project/linux-pwm/patch/20210726140001.24820-8-nikita.shubin@maquefel.me/).

Not sure what want wrong here

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] 27+ messages in thread

* Re: [PATCH 7/7] pwm: ep93xx: Prepare clock before using it
  2021-09-14  7:58       ` Uwe Kleine-König
@ 2021-09-14 10:15         ` Alexander Sverdlin
  2021-09-14 10:19           ` Uwe Kleine-König
  0 siblings, 1 reply; 27+ messages in thread
From: Alexander Sverdlin @ 2021-09-14 10:15 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-pwm, Nikita Shubin, linux-kernel, H Hartley Sweeten,
	Thierry Reding, Geert Uytterhoeven, kernel, Lee Jones

Thank you, Uwe,

On Tue, 2021-09-14 at 09:58 +0200, Uwe Kleine-König wrote:
> > > On Mon, Jun 14, 2021 at 01:30:41AM +0200, Alexander Sverdlin wrote:
> > > > Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> > > > to Common Clock Framework.
> > > > 
> > > > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> > > 
> > > Maybe it would make sense to move the prepare into the probe function?!
> > > Anyhow, for now preparing the driver for the common-clk switch is the
> > > focus and for that the conversion is correct, so:
> > > 
> > > Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > would you take this patch only, please?
> > It didn't work out to sell the whole series as one piece and
> > most of them were taken individually...
> 
> Hmm, this patch is marked as accepted in patchwork
> (http://patchwork.ozlabs.org/project/linux-pwm/patch/20210613233041.128961-8-alexander.sverdlin@gmail.com/).
> There is also a v2, that is also marked as accepted
> (http://patchwork.ozlabs.org/project/linux-pwm/patch/20210726140001.24820-8-nikita.shubin@maquefel.me/).
> 
> Not sure what want wrong here

Sorry for the noise!

-- 
Alexander Sverdlin.



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

* Re: [PATCH 7/7] pwm: ep93xx: Prepare clock before using it
  2021-09-14 10:15         ` Alexander Sverdlin
@ 2021-09-14 10:19           ` Uwe Kleine-König
  0 siblings, 0 replies; 27+ messages in thread
From: Uwe Kleine-König @ 2021-09-14 10:19 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: linux-pwm, Nikita Shubin, linux-kernel, H Hartley Sweeten,
	Thierry Reding, Geert Uytterhoeven, kernel, Lee Jones

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

On Tue, Sep 14, 2021 at 12:15:14PM +0200, Alexander Sverdlin wrote:
> Thank you, Uwe,
> 
> On Tue, 2021-09-14 at 09:58 +0200, Uwe Kleine-König wrote:
> > > > On Mon, Jun 14, 2021 at 01:30:41AM +0200, Alexander Sverdlin wrote:
> > > > > Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> > > > > to Common Clock Framework.
> > > > > 
> > > > > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> > > > 
> > > > Maybe it would make sense to move the prepare into the probe function?!
> > > > Anyhow, for now preparing the driver for the common-clk switch is the
> > > > focus and for that the conversion is correct, so:
> > > > 
> > > > Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > 
> > > would you take this patch only, please?
> > > It didn't work out to sell the whole series as one piece and
> > > most of them were taken individually...
> > 
> > Hmm, this patch is marked as accepted in patchwork
> > (http://patchwork.ozlabs.org/project/linux-pwm/patch/20210613233041.128961-8-alexander.sverdlin@gmail.com/).
> > There is also a v2, that is also marked as accepted
> > (http://patchwork.ozlabs.org/project/linux-pwm/patch/20210726140001.24820-8-nikita.shubin@maquefel.me/).
> > 
> > Not sure what want wrong here
> 
> Sorry for the noise!

No, it's no noise because I didn't see either of the versions in any
tree. So the patches were marked as applied without being applied ...

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] 27+ messages in thread

* Re: [PATCH 3/7] Input: ep93xx_keypad: Prepare clock before using it
  2021-09-13 21:29         ` Alexander Sverdlin
@ 2021-10-12  1:43           ` Dmitry Torokhov
  2021-10-12  7:44             ` Alexander Sverdlin
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Torokhov @ 2021-10-12  1:43 UTC (permalink / raw)
  To: Alexander Sverdlin
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-input, linux-kernel

Hi Alexander,

On Mon, Sep 13, 2021 at 11:29:14PM +0200, Alexander Sverdlin wrote:
> Hello Dmitry,
> 
> On Sat, 2021-06-19 at 20:23 -0700, Dmitry Torokhov wrote:
> > > On Mon, 2021-06-14 at 14:55 -0700, Dmitry Torokhov wrote:
> > > > > Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch
> > > > > to Common Clock Framework.
> > > > 
> > > > Can this be merged standalone?
> > > 
> > > In principle, yes, but I thought it would be easier if the patches
> > > would go via the same path as CCF conversion.
> > 
> > OK, in this case:
> > 
> > Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> 
> our initial attempt to find a maintainer for the whole series
> didn't work out. Would you take this single patch, please?
> Three others were already taken into respective subsystems
> and I'll ping the rest of maintainers individually...

It looks like I forgot to mention it, but I applied this patch and it
should be in mainline now. I also CCed you on a few patches to
ep93xx_keyboard driver and woudl appreciate if you looked them over as I
do not have the hardware.

Thanks.

-- 
Dmitry

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

* Re: [PATCH 3/7] Input: ep93xx_keypad: Prepare clock before using it
  2021-10-12  1:43           ` Dmitry Torokhov
@ 2021-10-12  7:44             ` Alexander Sverdlin
  0 siblings, 0 replies; 27+ messages in thread
From: Alexander Sverdlin @ 2021-10-12  7:44 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Geert Uytterhoeven, Nikita Shubin, linux-input, linux-kernel

Hello Dmitry,

On Mon, 2021-10-11 at 18:43 -0700, Dmitry Torokhov wrote:
> It looks like I forgot to mention it, but I applied this patch and it
> should be in mainline now. I also CCed you on a few patches to
> ep93xx_keyboard driver and woudl appreciate if you looked them over as I
> do not have the hardware.

thank you for the note!
I've acked 3 of the 4 patches you've sent, but will have comments on the
4th one...

-- 
Alexander Sverdlin.



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

end of thread, other threads:[~2021-10-12  7:44 UTC | newest]

Thread overview: 27+ 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-13 23:30 ` [PATCH 2/7] spi: spi-ep93xx: " Alexander Sverdlin
2021-06-14 10:34   ` Mark Brown
2021-06-13 23:30 ` [PATCH 3/7] Input: ep93xx_keypad: " Alexander Sverdlin
2021-06-14 21:55   ` Dmitry Torokhov
2021-06-15  7:46     ` Alexander Sverdlin
2021-06-20  3:23       ` Dmitry Torokhov
2021-08-02  7:28         ` Alexander Sverdlin
2021-09-13 21:29         ` Alexander Sverdlin
2021-10-12  1:43           ` Dmitry Torokhov
2021-10-12  7:44             ` Alexander Sverdlin
2021-06-13 23:30 ` [PATCH 4/7] video: ep93xx: " Alexander Sverdlin
2021-06-13 23:30 ` [PATCH 5/7] dmaengine: " Alexander Sverdlin
2021-06-13 23:30 ` [PATCH 6/7] ASoC: cirrus: i2s: " Alexander Sverdlin
2021-06-13 23:30 ` [PATCH 7/7] pwm: ep93xx: " Alexander Sverdlin
2021-06-14  7:22   ` Uwe Kleine-König
2021-06-14  7:30     ` Alexander Sverdlin
2021-09-13 21:46     ` Alexander Sverdlin
2021-09-14  7:58       ` Uwe Kleine-König
2021-09-14 10:15         ` Alexander Sverdlin
2021-09-14 10:19           ` Uwe Kleine-König
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).