Date:2010-05-31 02:36:43 (13 years 6 months ago)
Author:Lars C.
Commit:204d8c725e36e20e0d89742bb89a22e67a620906
Message:jz4740: PWM: Fix duty time

The PWM signal stays at the inital level for the time written to the duty
register. Thats the opposite of what we want, so we have to invert the duty
time before writing it to the hardware.
Files: arch/mips/jz4740/pwm.c (1 diff)

Change Details

arch/mips/jz4740/pwm.c
131131
132132    tmp = (unsigned long long)period * duty_ns;
133133    do_div(tmp, period_ns);
134    duty = tmp;
134    duty = period - tmp;
135135
136136    if (duty >= period)
137137        duty = period - 1;

Archive Download the corresponding diff file



interactive