From: Alexandre Belloni Date: Fri, 14 Mar 2014 14:19:08 +0000 (+0100) Subject: pwm: atmel: Fix polarity handling X-Git-Tag: v3.15-rc1~73^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8db9e29fe540c9640ea60f37ecf99d3a73bd12c5;p=pandora-kernel.git pwm: atmel: Fix polarity handling 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 overwriting the prescaler bits. Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Signed-off-by: Thierry Reding --- Reading git-diff-tree failed