From: Tomasz Figa Date: Tue, 23 Apr 2013 15:46:29 +0000 (+0200) Subject: clocksource: samsung_pwm_timer: Correct programming of clock events X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~6^2^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fe4dfd041dadbc1cc2460ed8680f2734dc3dc95;p=pandora-kernel.git clocksource: samsung_pwm_timer: Correct programming of clock events In current code, the tick count value programmed to the hardware is always decremented by one. This is reasonable for periodic mode, since there is one extra tick between 0 and COUNT (after reloading), but it makes oneshot events happen 1 tick earlier than requested, because the interrupt is triggered on transition from 1 to 0. This patch removes the decrementation from PWM channel setup code and moves it instead to periodic timer setup, to make both periodic and oneshot modes work correctly. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Reviewed-by: Arnd Bergmann Acked-by: Kukjin Kim Signed-off-by: Olof Johansson --- Reading git-diff-tree failed