提交 61c3b197 编写于 作者: P Prashant Gaikwad 提交者: Stephen Warren

staging: nvec: add clk_prepare/clk_unprepare

Use clk_prepare/clk_unprepare as required by the generic clk framework.

Cc: gregkh@linuxfoundation.org
Cc: ac100@lists.launchpad.net
Cc: devel@driverdev.osuosl.org
Signed-off-by: NPrashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: NStephen Warren <swarren@nvidia.com>
Acked-by: NMarc Dietrich <marvin24@gmx.de>
上级 cb53417e
......@@ -675,7 +675,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
{
u32 val;
clk_enable(nvec->i2c_clk);
clk_prepare_enable(nvec->i2c_clk);
tegra_periph_reset_assert(nvec->i2c_clk);
udelay(2);
......@@ -695,14 +695,14 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
enable_irq(nvec->irq);
clk_disable(nvec->i2c_clk);
clk_disable_unprepare(nvec->i2c_clk);
}
static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
{
disable_irq(nvec->irq);
writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
clk_disable(nvec->i2c_clk);
clk_disable_unprepare(nvec->i2c_clk);
}
static void nvec_power_off(void)
......@@ -812,7 +812,7 @@ static int __devinit tegra_nvec_probe(struct platform_device *pdev)
tegra_init_i2c_slave(nvec);
clk_enable(i2c_clk);
clk_prepare_enable(i2c_clk);
/* enable event reporting */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册