From 239595a8f51705c7684299e8db02a686d2f3741d Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Wed, 26 Mar 2014 16:13:04 +0800 Subject: [PATCH] rk3288:pwm_regulator:slove pwm io set low when power on --- drivers/regulator/rockchip-pwm-regulator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/rockchip-pwm-regulator.c b/drivers/regulator/rockchip-pwm-regulator.c index 3e5d1acf2a4f..f88ec03f4e57 100755 --- a/drivers/regulator/rockchip-pwm-regulator.c +++ b/drivers/regulator/rockchip-pwm-regulator.c @@ -55,9 +55,9 @@ static int pwm_set_rate(struct pwm_platform_data *pdata,u32 rate) duty_cycle = (rate * (pdata->period ) / 100) ; pwm_config(pdata->pwm, duty_cycle, pdata->period); - - usleep_range(10*1000, 10*1000); + pwm_enable(pdata->pwm); + return (0); } @@ -332,7 +332,6 @@ static int __init pwm_regulator_probe(struct platform_device *pdev) goto err; } } - pwm_enable(pdata->pwm); if (pdata->pwm_period_ns > 0) pwm_set_period(pdata->pwm, pdata->pwm_period_ns); -- 2.34.1