Files
OpenCellular/include
Nicolas Boichat e3336f4c8d chip/stm32/pwm: Prevent sleeping while PWM output is active
STM32F0 cannot keep PWM output active when chip is in deep sleep.

The only other board that uses both CONFIG_LOW_POWER_IDLE
and CONFIG_PWM on stm32 is jerry, and this logic should also apply
to it.

Also, switch using_pwm from array to bitmask to simplify handling.

BRANCH=none
BUG=b:36173380
TEST=On AP, tell it to autosuspend hammer:
     echo auto > /sys/bus/usb/devices/1-2/power/control
     Then see, using idlestats, that hammer does to deep sleep.
     In hammer console: pwm 0 50, see that PWM output is stable,
     idlestats shows EC does not sleep.
     In hammer console: pwm 0 -1, idlestats shows EC sleeps again.

Change-Id: Ic74c1905364fe4335239da95a99193d0e3e979f7
Reviewed-on: https://chromium-review.googlesource.com/541115
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2017-07-04 06:51:01 -07:00
..
2017-02-17 04:09:37 -08:00
2017-01-07 13:29:52 -08:00
2016-05-26 16:17:26 -07:00
2013-12-17 21:27:53 +00:00
2017-06-28 23:23:41 -07:00
2017-05-12 18:46:14 -07:00
2017-03-16 04:17:32 -07:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2015-07-27 22:19:16 +00:00
2014-02-08 00:14:48 +00:00
2013-10-25 20:12:49 +00:00
2015-06-10 18:24:05 +00:00
2015-05-27 03:58:16 +00:00
2015-05-27 03:58:16 +00:00
2013-06-26 09:08:23 -07:00
2017-02-06 14:50:32 -08:00
2011-12-07 19:10:02 +00:00
2016-11-08 17:11:28 -08:00
2017-06-02 10:38:57 -07:00
2012-10-25 14:12:11 -07:00
2016-07-29 10:51:22 -07:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2016-11-15 17:41:53 -08:00
2017-02-23 11:36:21 -08:00
2017-03-13 17:53:58 -07:00
2016-11-08 17:11:28 -08:00
2015-09-16 14:49:46 -07:00
2017-06-29 10:37:40 -07:00
2017-02-23 11:36:21 -08:00
2017-06-29 10:37:40 -07:00
2017-06-29 10:37:40 -07:00
2015-06-18 19:07:00 +00:00
2017-06-28 21:50:51 -07:00
2015-01-20 20:56:43 +00:00