linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] spi: omap-uwire: Use clk_prepare_enable and clk_disable_unprepare
@ 2020-07-15  5:26 Qing Zhang
  2020-07-15  5:26 ` [PATCH v2 2/2] spi: coldfire-qspi: " Qing Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Qing Zhang @ 2020-07-15  5:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, linux-kernel

Convert clk_enable() to clk_prepare_enable() and clk_disable() to
clk_disable_unprepare() respectively in the spi-omap-uwire.c.

Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
---

v2:
  -Modify the commit message
  -Split into two patches

 drivers/spi/spi-omap-uwire.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c
index ce8dbdb..71402f7 100644
--- a/drivers/spi/spi-omap-uwire.c
+++ b/drivers/spi/spi-omap-uwire.c
@@ -443,7 +443,7 @@ static void uwire_cleanup(struct spi_device *spi)
 static void uwire_off(struct uwire_spi *uwire)
 {
 	uwire_write_reg(UWIRE_SR3, 0);
-	clk_disable(uwire->ck);
+	clk_disable_unprepare(uwire->ck);
 	spi_master_put(uwire->bitbang.master);
 }
 
@@ -475,7 +475,7 @@ static int uwire_probe(struct platform_device *pdev)
 		spi_master_put(master);
 		return status;
 	}
-	clk_enable(uwire->ck);
+	clk_prepare_enable(uwire->ck);
 
 	if (cpu_is_omap7xx())
 		uwire_idx_shift = 1;
-- 
2.1.0


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

* [PATCH v2 2/2] spi: coldfire-qspi: Use clk_prepare_enable and clk_disable_unprepare
  2020-07-15  5:26 [PATCH v2 1/2] spi: omap-uwire: Use clk_prepare_enable and clk_disable_unprepare Qing Zhang
@ 2020-07-15  5:26 ` Qing Zhang
  2020-07-15  9:49   ` Mark Brown
  2020-07-15 14:59 ` [PATCH v2 1/2] spi: omap-uwire: " Mark Brown
  2020-07-16 23:58 ` Mark Brown
  2 siblings, 1 reply; 6+ messages in thread
From: Qing Zhang @ 2020-07-15  5:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, linux-kernel

Convert clk_enable() to clk_prepare_enable() and clk_disable() to
clk_disable_unprepare() respectively in the spi-coldfire-qspi.c.

Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
---

v2:
    -Modify the commit message
    -Split into two patches

 drivers/spi/spi-coldfire-qspi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c
index f80e06c..8996115 100644
--- a/drivers/spi/spi-coldfire-qspi.c
+++ b/drivers/spi/spi-coldfire-qspi.c
@@ -387,7 +387,7 @@ static int mcfqspi_probe(struct platform_device *pdev)
 		status = PTR_ERR(mcfqspi->clk);
 		goto fail0;
 	}
-	clk_enable(mcfqspi->clk);
+	clk_prepare_enable(mcfqspi->clk);
 
 	master->bus_num = pdata->bus_num;
 	master->num_chipselect = pdata->num_chipselect;
@@ -425,7 +425,7 @@ static int mcfqspi_probe(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 	mcfqspi_cs_teardown(mcfqspi);
 fail1:
-	clk_disable(mcfqspi->clk);
+	clk_disable_unprepare(mcfqspi->clk);
 fail0:
 	spi_master_put(master);
 
-- 
2.1.0


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

* Re: [PATCH v2 2/2] spi: coldfire-qspi: Use clk_prepare_enable and clk_disable_unprepare
  2020-07-15  5:26 ` [PATCH v2 2/2] spi: coldfire-qspi: " Qing Zhang
@ 2020-07-15  9:49   ` Mark Brown
  2020-07-16 10:01     ` zhangqing
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2020-07-15  9:49 UTC (permalink / raw)
  To: Qing Zhang; +Cc: linux-spi, linux-kernel

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

On Wed, Jul 15, 2020 at 01:26:47PM +0800, Qing Zhang wrote:
> Convert clk_enable() to clk_prepare_enable() and clk_disable() to
> clk_disable_unprepare() respectively in the spi-coldfire-qspi.c.

Like I said on the previous version are you sure that ColdFire uses the
common clock framework and has the prepare calls?

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

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

* Re: [PATCH v2 1/2] spi: omap-uwire: Use clk_prepare_enable and clk_disable_unprepare
  2020-07-15  5:26 [PATCH v2 1/2] spi: omap-uwire: Use clk_prepare_enable and clk_disable_unprepare Qing Zhang
  2020-07-15  5:26 ` [PATCH v2 2/2] spi: coldfire-qspi: " Qing Zhang
@ 2020-07-15 14:59 ` Mark Brown
  2020-07-16 23:58 ` Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2020-07-15 14:59 UTC (permalink / raw)
  To: Qing Zhang; +Cc: linux-kernel, linux-spi

On Wed, 15 Jul 2020 13:26:46 +0800, Qing Zhang wrote:
> Convert clk_enable() to clk_prepare_enable() and clk_disable() to
> clk_disable_unprepare() respectively in the spi-omap-uwire.c.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: omap-uwire: Use clk_prepare_enable and clk_disable_unprepare
      commit: badfae429b13ef173fe4627714894cb629aa1bc6

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

* Re: [PATCH v2 2/2] spi: coldfire-qspi: Use clk_prepare_enable and clk_disable_unprepare
  2020-07-15  9:49   ` Mark Brown
@ 2020-07-16 10:01     ` zhangqing
  0 siblings, 0 replies; 6+ messages in thread
From: zhangqing @ 2020-07-16 10:01 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, linux-kernel, Geert Uytterhoeven



On 07/15/2020 05:49 PM, Mark Brown wrote:
> On Wed, Jul 15, 2020 at 01:26:47PM +0800, Qing Zhang wrote:
>> Convert clk_enable() to clk_prepare_enable() and clk_disable() to
>> clk_disable_unprepare() respectively in the spi-coldfire-qspi.c.
> Like I said on the previous version are you sure that ColdFire uses the
> common clock framework and has the prepare calls?
Hi Mark,

Thanks for your reminder again.

I see the following comment and code in arch/m68k/coldfire/clk.c:

For more advanced ColdFire parts that have clocks that can be enabled
we supply enable/disable functions. These must properly define their
clocks in their platform specific code.

int clk_enable(struct clk *clk)
{
     unsigned long flags;
     spin_lock_irqsave(&clk_lock, flags);
     if ((clk->enabled++ == 0) && clk->clk_ops)
         clk->clk_ops->enable(clk);
     spin_unlock_irqrestore(&clk_lock, flags);

     return 0;
}
EXPORT_SYMBOL(clk_enable);

void clk_disable(struct clk *clk)
{
     unsigned long flags;

     if (!clk)
         return;

     spin_lock_irqsave(&clk_lock, flags);
     if ((--clk->enabled == 0) && clk->clk_ops)
         clk->clk_ops->disable(clk);
     spin_unlock_irqrestore(&clk_lock, flags);
}
EXPORT_SYMBOL(clk_disable);

Thanks,
Qing


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

* Re: [PATCH v2 1/2] spi: omap-uwire: Use clk_prepare_enable and clk_disable_unprepare
  2020-07-15  5:26 [PATCH v2 1/2] spi: omap-uwire: Use clk_prepare_enable and clk_disable_unprepare Qing Zhang
  2020-07-15  5:26 ` [PATCH v2 2/2] spi: coldfire-qspi: " Qing Zhang
  2020-07-15 14:59 ` [PATCH v2 1/2] spi: omap-uwire: " Mark Brown
@ 2020-07-16 23:58 ` Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2020-07-16 23:58 UTC (permalink / raw)
  To: Qing Zhang; +Cc: linux-kernel, linux-spi

On Wed, 15 Jul 2020 13:26:46 +0800, Qing Zhang wrote:
> Convert clk_enable() to clk_prepare_enable() and clk_disable() to
> clk_disable_unprepare() respectively in the spi-omap-uwire.c.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: coldfire-qspi: Use clk_prepare_enable and clk_disable_unprepare
      commit: 499de01c5c0b813cc94dbfc722ec12487044ac4a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2020-07-16 23:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15  5:26 [PATCH v2 1/2] spi: omap-uwire: Use clk_prepare_enable and clk_disable_unprepare Qing Zhang
2020-07-15  5:26 ` [PATCH v2 2/2] spi: coldfire-qspi: " Qing Zhang
2020-07-15  9:49   ` Mark Brown
2020-07-16 10:01     ` zhangqing
2020-07-15 14:59 ` [PATCH v2 1/2] spi: omap-uwire: " Mark Brown
2020-07-16 23:58 ` Mark Brown

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