diff options
author | Richard Zhao <richard.zhao@linaro.org> | 2011-11-15 01:48:08 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-01 08:29:31 -0500 |
commit | 83914337d117ac6537c2fff6c32e2c3a9810f7d4 (patch) | |
tree | 32b45193fc8c22e96eb02636e1d4d571a297f06f /drivers/i2c | |
parent | ef5ca193ca9ecbcfa41c0d258c4f4c344c157202 (diff) |
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.c | 4 |
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) | |||
196 | 196 | ||
197 | dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__); | 197 | dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__); |
198 | 198 | ||
199 | clk_enable(i2c_imx->clk); | 199 | clk_prepare_enable(i2c_imx->clk); |
200 | writeb(i2c_imx->ifdr, i2c_imx->base + IMX_I2C_IFDR); | 200 | writeb(i2c_imx->ifdr, i2c_imx->base + IMX_I2C_IFDR); |
201 | /* Enable I2C controller */ | 201 | /* Enable I2C controller */ |
202 | writeb(0, i2c_imx->base + IMX_I2C_I2SR); | 202 | writeb(0, i2c_imx->base + IMX_I2C_I2SR); |
@@ -245,7 +245,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx) | |||
245 | 245 | ||
246 | /* Disable I2C controller */ | 246 | /* Disable I2C controller */ |
247 | writeb(0, i2c_imx->base + IMX_I2C_I2CR); | 247 | writeb(0, i2c_imx->base + IMX_I2C_I2CR); |
248 | clk_disable(i2c_imx->clk); | 248 | clk_disable_unprepare(i2c_imx->clk); |
249 | } | 249 | } |
250 | 250 | ||
251 | static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx, | 251 | static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx, |