提交 c23c081a 编写于 作者: R Richard Zhao 提交者: Sascha Hauer

ARM: mxc: pwm: add clk_prepare/clk_unprepare

It's for migrating to generic clk framework API.
Signed-off-by: NRichard Zhao <richard.zhao@linaro.org>
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 dc9774c9
......@@ -132,7 +132,7 @@ int pwm_enable(struct pwm_device *pwm)
int rc = 0;
if (!pwm->clk_enabled) {
rc = clk_enable(pwm->clk);
rc = clk_prepare_enable(pwm->clk);
if (!rc)
pwm->clk_enabled = 1;
}
......@@ -145,7 +145,7 @@ void pwm_disable(struct pwm_device *pwm)
writel(0, pwm->mmio_base + MX3_PWMCR);
if (pwm->clk_enabled) {
clk_disable(pwm->clk);
clk_disable_unprepare(pwm->clk);
pwm->clk_enabled = 0;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册