mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 08:46:40 +07:00
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>
This commit is contained in:
parent
ef5ca193ca
commit
83914337d1
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user