PWM: ehrpwm: Fix polarity polarity of PWM signal.
authorPhilip, Avinash <avinashphilip@ti.com>
Thu, 15 Mar 2012 12:11:01 +0000 (17:41 +0530)
committerPhilip, Avinash <avinashphilip@ti.com>
Thu, 15 Mar 2012 14:35:32 +0000 (20:05 +0530)
commite799249d2a9a52015f70e6437b29aecd10c53b84
treea036af25071fff1c4d6cf49b0857d25bea981c24
parent2ac7e1da8ee54848ee8c07ad8aa229108fe14f93
PWM: ehrpwm: Fix polarity polarity of PWM signal.

While configuring duty percentage for eHRPWM, polarity is also
configured. On reset, counter value is zero. So, on configuring
polarity, eHRPWM line goes high as counter is zero. This results in 100%
duty cycle and starts eHRPWM even before calling pwm_start.

This patch fixes the same.

Also this patch moves ehrpwm_pwm_set_pol function definition to starting of the
file to avoid prototype declaration.

Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
drivers/pwm/ehrpwm.c