Skip to content
Commit 10d56a4c authored by Ilkka Koskinen's avatar Ilkka Koskinen Committed by Thierry Reding
Browse files

pwm: lpss: Avoid reconfiguring while UPDATE bit is still enabled



PWM Configuration register has SW_UPDATE bit that is set when a new
configuration is written to the register. The bit is automatically
cleared at the start of the next output cycle by the IP block.

If one writes a new configuration to the register while it still has
the bit enabled, PWM may freeze. That is, while one can still write
to the register, it won't have an effect. Thus, we try to sleep long
enough that the bit gets cleared and make sure the bit is not
enabled while we update the configuration.

Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: default avatarRichard Griffiths <richard.a.griffiths@intel.com>
Signed-off-by: default avatarIlkka Koskinen <ilkka.koskinen@intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent b14e8cef
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment