]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: lpss: Rework the sequence of programming PWM_SW_UPDATE
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 18 Nov 2015 11:25:18 +0000 (13:25 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 16 Dec 2015 15:52:09 +0000 (16:52 +0100)
commit184746d6209a6016d1c25986dede2e1f143c1c1e
tree17902c0f618967159895e75b2d3b3b609f30a5ac
parent924b8621ef9ecad851b03436aa2661ecd88a31c7
pwm: lpss: Rework the sequence of programming PWM_SW_UPDATE

Setting of PWM_SW_UPDATE is bit different in Intel Broxton compared to the
previous generation SoCs. Previously it was OK to set the bit many times
(from userspace via sysfs for example) before the PWM is actually enabled.

Starting from Intel Broxton it seems that we must set PWM_SW_UPDATE only
once before the PWM is enabled. Otherwise it is possible that the PWM does
not start properly.

Change the sequence of how PWM_SW_UPDATE is programmed so that we only set
it in pwm_lpss_config() when the PWM is already enabled. The initial
setting of PWM_SW_UPDATE will be done when PWM gets enabled. This should
make the driver work with the previous generation Intel SoCs and Broxton.

Add also small delay after the bit is set to let the hardware propagate it
properly.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-lpss.c