pwm: vt8500: Ensure PWM clock is enabled during pwm_config
authorTony Prisk <linux@prisktech.co.nz>
Mon, 19 Nov 2012 17:44:46 +0000 (06:44 +1300)
committerThierry Reding <thierry.reding@avionic-design.de>
Thu, 22 Nov 2012 21:47:12 +0000 (22:47 +0100)
commit422470a8265fbb1d182c00ab2421f4b416ab2dba
treeaacef5cee631f3a0a15b0f927cc06151a3ce4eca
parent2f9569f7ceab31242b306d040861737580e1876f
pwm: vt8500: Ensure PWM clock is enabled during pwm_config

This patch corrects a bug reported by Peter Vasil.

When all PWMs are disabled, PWM module may be disabled during
calls to pwm_config. This patch enables/disables the clock in
pwm_config to ensure the module is active before register read/
writes.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Tested-by: Peter Vasil <petervasil@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
drivers/pwm/pwm-vt8500.c