Date:2010-05-31 01:16:30 (13 years 6 months ago)
Author:Lars C.
Commit:c498c160386bf30c3b130e844947141d76bb63dc
Message:jz4740: PWM: Disable the PWM output while updating the PWM registers

Files: arch/mips/jz4740/pwm.c (2 diffs)

Change Details

arch/mips/jz4740/pwm.c
137137        duty = period - 1;
138138
139139    is_enabled = jz4740_timer_is_enabled(id);
140    jz4740_timer_disable(id);
140    if (is_enabled)
141        pwm_disable(pwm);
141142
142143    jz4740_timer_set_count(id, 0);
143144    jz4740_timer_set_duty(id, duty);
...... 
148149    jz4740_timer_set_ctrl(id, ctrl);
149150
150151    if (is_enabled)
151        jz4740_timer_enable(id);
152        pwm_enable(pwm);
152153
153154    return 0;
154155}

Archive Download the corresponding diff file



interactive