linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Ralf Baechle <ralf@linux-mips.org>,
	Atsushi Nemoto <anemo@mba.ocn.ne.jp>,
	Mark Brown <broonie@kernel.org>, Wim Van Sebroeck <wim@iguana.be>,
	Guenter Roeck <linux@roeck-us.net>
Cc: linux-clk@vger.kernel.org, linux-mips@linux-mips.org,
	linux-spi@vger.kernel.org, linux-watchdog@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 1/3] spi: spi-txx9: Add missing clock (un)prepare calls for CCF
Date: Thu, 18 Aug 2016 19:34:25 +0200	[thread overview]
Message-ID: <1471541667-30689-2-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1471541667-30689-1-git-send-email-geert@linux-m68k.org>

While the custom minimal TXx9 clock implementation doesn't need or use
clock (un)prepare calls (they are dummies if !CONFIG_HAVE_CLK_PREPARE),
they are mandatory when using the Common Clock Framework.

Hence add them, to prepare for the advent of CCF.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Untested due to lack of hardware.
---
 drivers/spi/spi-txx9.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c
index 7492ea346b43ed5b..51759d3fd45f6b06 100644
--- a/drivers/spi/spi-txx9.c
+++ b/drivers/spi/spi-txx9.c
@@ -346,7 +346,7 @@ static int txx9spi_probe(struct platform_device *dev)
 		c->clk = NULL;
 		goto exit;
 	}
-	ret = clk_enable(c->clk);
+	ret = clk_prepare_enable(c->clk);
 	if (ret) {
 		c->clk = NULL;
 		goto exit;
@@ -395,7 +395,7 @@ static int txx9spi_probe(struct platform_device *dev)
 exit_busy:
 	ret = -EBUSY;
 exit:
-	clk_disable(c->clk);
+	clk_disable_unprepare(c->clk);
 	spi_master_put(master);
 	return ret;
 }
@@ -406,7 +406,7 @@ static int txx9spi_remove(struct platform_device *dev)
 	struct txx9spi *c = spi_master_get_devdata(master);
 
 	flush_work(&c->work);
-	clk_disable(c->clk);
+	clk_disable_unprepare(c->clk);
 	return 0;
 }
 
-- 
1.9.1

  reply	other threads:[~2016-08-18 17:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-18 17:34 [PATCH 0/3] MIPS: TXx9: Common Clock Framework Conversion Geert Uytterhoeven
2016-08-18 17:34 ` Geert Uytterhoeven [this message]
2016-08-18 17:34 ` [PATCH 2/3] watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF Geert Uytterhoeven
2016-08-18 18:58   ` Guenter Roeck
     [not found]   ` <1471541667-30689-3-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2016-08-20  8:36     ` Guenter Roeck
2016-08-18 17:34 ` [PATCH 3/3] MIPS: TXx9: Convert to Common Clock Framework Geert Uytterhoeven
2016-08-19 12:05   ` Atsushi Nemoto
     [not found]   ` <1471541667-30689-4-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2016-08-19 19:17     ` Stephen Boyd
     [not found]       ` <20160819191750.GV361-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-08-22  8:46         ` Geert Uytterhoeven
2016-08-22 17:37           ` Stephen Boyd
2016-08-18 18:11 ` [PATCH 0/3] MIPS: TXx9: Common Clock Framework Conversion Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471541667-30689-2-git-send-email-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=broonie@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=ralf@linux-mips.org \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).