Re: [PATCH 1/2] PWM: atmel: Fix polarity handling

2014-03-14 Thread Nicolas Ferre
On 14/03/2014 15:19, Alexandre Belloni : > When atmel_pwm_config() calculates and then sets the prescaler, it is > overwriting the channel's CMR register so we are losing the CPOL > configuration. > > As atmel_pwm_config() is always called before enabling a channel, inverting > the > polarity

[PATCH 1/2] PWM: atmel: Fix polarity handling

2014-03-14 Thread Alexandre Belloni
When atmel_pwm_config() calculates and then sets the prescaler, it is overwriting the channel's CMR register so we are losing the CPOL configuration. As atmel_pwm_config() is always called before enabling a channel, inverting the polarity doesn't work. Fix that by reading CMR first and only

[PATCH 1/2] PWM: atmel: Fix polarity handling

2014-03-14 Thread Alexandre Belloni
When atmel_pwm_config() calculates and then sets the prescaler, it is overwriting the channel's CMR register so we are losing the CPOL configuration. As atmel_pwm_config() is always called before enabling a channel, inverting the polarity doesn't work. Fix that by reading CMR first and only

Re: [PATCH 1/2] PWM: atmel: Fix polarity handling

2014-03-14 Thread Nicolas Ferre
On 14/03/2014 15:19, Alexandre Belloni : When atmel_pwm_config() calculates and then sets the prescaler, it is overwriting the channel's CMR register so we are losing the CPOL configuration. As atmel_pwm_config() is always called before enabling a channel, inverting the polarity doesn't