* [PATCH] i2c: Add clk_prepare/clk_unprepare calls to i2c-pxa
@ 2012-03-15 18:18 Philipp Zabel
0 siblings, 0 replies; only message in thread
From: Philipp Zabel @ 2012-03-15 18:18 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: Haojian Zhuang, Eric Miao, Jean Delvare, Ben Dooks, Wolfram Sang
This patch adds clk_prepare/clk_unprepare calls to the i2c-pxa
driver by using the helper functions clk_prepare_enable and
clk_disable_unprepare.
Signed-off-by: Philipp Zabel <philipp.zabel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Haojian Zhuang <haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
Cc: Eric Miao <eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
drivers/i2c/busses/i2c-pxa.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index d603646..950b76c 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -42,8 +42,10 @@
#ifndef CONFIG_HAVE_CLK
#define clk_get(dev, id) NULL
#define clk_put(clk) do { } while (0)
+#define clk_prepare_enable(clk) do { } while (0)
#define clk_disable(clk) do { } while (0)
#define clk_enable(clk) do { } while (0)
+#define clk_disable_unprepare(clk) do { } while (0)
#endif
struct pxa_reg_layout {
@@ -1116,7 +1118,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
}
#endif
- clk_enable(i2c->clk);
+ clk_prepare_enable(i2c->clk);
if (plat) {
i2c->adap.class = plat->class;
@@ -1164,7 +1166,7 @@ eadapt:
if (!i2c->use_pio)
free_irq(irq, i2c);
ereqirq:
- clk_disable(i2c->clk);
+ clk_disable_unprepare(i2c->clk);
iounmap(i2c->reg_base);
eremap:
clk_put(i2c->clk);
@@ -1185,7 +1187,7 @@ static int __exit i2c_pxa_remove(struct platform_device *dev)
if (!i2c->use_pio)
free_irq(i2c->irq, i2c);
- clk_disable(i2c->clk);
+ clk_disable_unprepare(i2c->clk);
clk_put(i2c->clk);
iounmap(i2c->reg_base);
--
1.7.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-15 18:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 18:18 [PATCH] i2c: Add clk_prepare/clk_unprepare calls to i2c-pxa Philipp Zabel
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).