summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@linaro.org>2011-11-15 14:48:08 +0800
committerSascha Hauer <s.hauer@pengutronix.de>2012-02-01 14:29:31 +0100
commit83914337d117ac6537c2fff6c32e2c3a9810f7d4 (patch)
tree32b45193fc8c22e96eb02636e1d4d571a297f06f /drivers/i2c
parentef5ca193ca9ecbcfa41c0d258c4f4c344c157202 (diff)
downloadlinux-stable-83914337d117ac6537c2fff6c32e2c3a9810f7d4.tar.gz
linux-stable-83914337d117ac6537c2fff6c32e2c3a9810f7d4.tar.bz2
linux-stable-83914337d117ac6537c2fff6c32e2c3a9810f7d4.zip
i2c: imx: add clk_prepare/clk_unprepare
It's for migrating to generic clk framework API. Signed-off-by: Richard Zhao <richard.zhao@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-imx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 58832e578fff..8d1ab6fa88e1 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -196,7 +196,7 @@ static int i2c_imx_start(struct imx_i2c_struct *i2c_imx)
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
- clk_enable(i2c_imx->clk);
+ clk_prepare_enable(i2c_imx->clk);
writeb(i2c_imx->ifdr, i2c_imx->base + IMX_I2C_IFDR);
/* Enable I2C controller */
writeb(0, i2c_imx->base + IMX_I2C_I2SR);
@@ -245,7 +245,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
/* Disable I2C controller */
writeb(0, i2c_imx->base + IMX_I2C_I2CR);
- clk_disable(i2c_imx->clk);
+ clk_disable_unprepare(i2c_imx->clk);
}
static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx,