Aseda Aboagye
46ca9738f2
chgstv2: Check charger power in prevent_power_on.
...
charge_prevent_power_on() had sections which were gated on the following
CONFIG_* option:
CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT
However, the block of code that this gated didn't even take the battery
percentage into account and made it very confusing as to why.
This commit simply changes the CONFIG_* option used to gate to be the
following:
CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON
This better reflects the checks that were actually being made.
Additionally, this CONFIG_* option is defined by default for boards that
have a chipset task and is initialized to 15W, which is the power that
indicates that the charger is likely to speak USB PD.
BUG=b:76174140
BRANCH=None
TEST=make -j buildall
Change-Id: Ic9158dd7109ce6082c6d00157ff266842363b295
Signed-off-by: Aseda Aboagye <aaboagye@google.com >
Reviewed-on: https://chromium-review.googlesource.com/977431
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org >
Tested-by: Aseda Aboagye <aaboagye@chromium.org >
Reviewed-by: Edward Hill <ecgh@chromium.org >
2018-04-10 19:13:32 -07:00
..
2017-02-17 04:09:37 -08:00
2018-03-09 20:05:06 -08:00
2013-12-12 18:21:56 +00:00
2016-05-26 16:17:26 -07:00
2015-10-02 12:55:51 -07:00
2013-12-17 21:27:53 +00:00
2018-01-18 05:09:37 -08:00
2017-09-12 16:17:03 -07:00
2014-12-31 00:01:00 +00:00
2017-01-13 05:00:27 -08:00
2018-02-09 07:55:33 -08:00
2016-08-23 15:36:55 -07:00
2016-08-12 20:49:45 -07:00
2017-08-30 03:58:28 -07:00
2016-07-22 20:37:17 -07:00
2016-11-15 17:41:58 -08:00
2017-11-17 20:18:38 -08:00
2016-04-22 20:40:03 -07:00
2014-02-08 04:15:39 +00:00
2017-10-19 12:56:42 -07:00
2018-04-10 16:29:16 -07:00
2018-03-09 20:05:13 -08:00
2017-11-01 16:47:21 -07:00
2014-04-11 15:37:38 +00:00
2018-03-28 23:23:32 -07:00
2017-11-30 20:30:11 -08:00
2016-02-26 21:22:07 -08:00
2017-02-10 19:02:55 -08:00
2018-03-09 07:17:50 -08:00
2018-04-03 18:47:12 -07:00
2015-02-10 10:47:07 +00:00
2018-03-19 17:04:53 -07:00
2017-06-15 07:07:40 -07:00
2015-09-24 18:07:01 -07:00
2018-04-10 19:13:32 -07:00
2018-02-28 15:21:13 -08:00
2017-05-10 07:08:31 -07:00
2017-12-18 20:32:58 -08:00
2016-03-18 22:16:53 -07:00
2018-02-23 23:13:01 -08:00
2018-02-23 03:36:35 -08:00
2017-01-25 22:12:28 -08:00
2017-07-03 21:44:34 -07:00
2017-06-30 03:08:42 -07:00
2017-08-23 17:01:21 -07:00
2015-07-27 22:19:16 +00:00
2014-02-08 00:14:48 +00:00
2018-04-04 18:52:15 -07:00
2018-03-28 23:23:31 -07:00
2018-02-07 11:55:57 -08:00
2013-10-25 20:12:49 +00:00
2018-01-02 15:48:20 -08:00
2017-08-02 15:02:34 -07:00
2017-06-06 14:36:28 -07:00
2015-06-10 18:24:05 +00:00
2018-03-06 09:59:21 -08:00
2017-09-21 01:07:55 -07:00
2018-03-20 07:24:25 -07:00
2015-09-18 17:55:32 -07:00
2016-09-09 17:15:25 -07:00
2015-05-27 03:58:16 +00:00
2017-12-28 12:35:08 -08:00
2015-05-27 03:58:16 +00:00
2018-02-02 10:17:30 -08:00
2018-02-16 21:41:41 -08:00
2013-06-26 09:08:23 -07:00
2018-03-20 19:30:14 -07:00
2012-11-04 20:27:57 -08:00
2015-06-18 19:07:00 +00:00
2017-05-18 18:07:29 -07:00
2016-11-17 07:08:25 -08:00
2018-03-26 02:07:23 -07:00
2016-07-19 18:33:36 -07:00
2017-12-12 03:57:19 -08:00
2016-04-01 00:21:35 -07:00
2018-02-05 19:08:21 -08:00
2013-03-22 11:24:29 -07:00
2015-09-19 12:27:21 -07:00
2017-05-02 17:45:16 -07:00
2018-02-05 23:05:39 -08:00
2015-07-17 03:17:57 +00:00
2015-08-10 20:42:18 +00:00
2013-04-02 14:12:57 -07:00
2014-10-08 02:50:54 +00:00
2014-10-15 18:22:37 +00:00
2015-10-23 18:03:12 -07:00
2018-03-05 23:48:28 -08:00
2018-03-26 17:03:27 -07:00
2015-10-13 05:28:54 -07:00
2015-10-13 05:28:54 -07:00
2015-10-13 05:28:54 -07:00
2015-10-13 05:28:54 -07:00
2011-12-07 19:10:02 +00:00
2016-11-04 18:31:37 -07:00
2018-03-05 00:21:21 -08:00
2016-11-08 17:11:28 -08:00
2018-03-14 04:06:52 -07:00
2017-06-02 10:38:57 -07:00
2016-12-21 19:42:37 -08:00
2017-02-23 01:19:07 -08:00
2012-10-25 14:12:11 -07:00
2017-07-28 17:45:13 -07:00
2017-11-07 15:25:17 -08:00
2012-11-01 12:45:22 -07:00
2018-01-12 03:27:08 -08:00
2015-10-19 18:21:22 -07:00
2017-06-19 21:03:29 -07:00
2013-04-24 16:32:58 -07:00
2017-11-15 13:23:32 -08:00
2018-03-20 19:30:06 -07:00
2015-06-18 19:07:00 +00:00
2017-03-24 06:49:55 -07:00
2015-06-18 19:07:00 +00:00
2015-07-15 21:57:36 +00:00
2018-02-22 20:17:14 -08:00
2017-06-14 01:19:31 -07:00
2017-04-11 20:22:32 -07:00
2017-09-26 18:24:07 -07:00
2017-10-10 22:13:43 -07:00
2016-01-29 02:59:58 +00:00
2015-06-18 19:07:00 +00:00
2017-06-14 05:59:37 -07:00
2018-02-09 05:24:46 -08:00
2016-11-15 17:41:53 -08:00
2017-11-30 11:48:57 -08:00
2017-12-28 14:50:32 -08:00
2016-09-23 12:21:51 -07:00
2016-12-07 23:45:29 +00:00
2018-01-08 17:22:48 -08:00
2015-06-18 19:07:00 +00:00
2015-04-10 22:08:25 +00:00
2017-12-05 18:00:38 -08:00
2016-11-08 17:11:28 -08:00
2017-08-15 00:25:20 -07:00
2017-04-25 05:52:34 -07:00
2017-05-04 21:38:51 -07:00
2015-06-18 19:07:00 +00:00
2014-02-08 04:21:26 +00:00
2015-09-16 14:49:46 -07:00
2015-01-14 03:15:41 +00:00
2014-08-10 18:39:24 +00:00
2016-07-21 17:32:28 -07:00
2018-01-21 22:20:48 -08:00
2017-08-23 12:19:07 -07:00
2017-07-30 22:41:06 -07:00
2018-01-11 22:22:46 -08:00
2018-02-23 03:36:31 -08: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
2017-10-25 03:58:50 -07:00
2018-03-26 23:33:33 -07:00
2018-02-02 10:17:30 -08:00
2015-06-18 19:07:00 +00:00
2017-10-06 13:47:12 -07:00
2018-02-24 01:22:46 -08:00
2017-09-22 10:18:50 -07:00
2017-09-01 12:39:19 -07:00
2016-11-16 19:04:47 -08:00
2017-11-24 02:39:04 -08:00
2017-10-31 21:49:24 -07:00
2015-11-08 17:31:12 -08:00
2018-04-10 19:12:48 -07:00
2018-04-10 19:12:55 -07:00
2018-03-20 19:30:17 -07:00
2017-11-21 18:53:35 -08:00
2017-02-17 04:09:37 -08:00
2015-07-01 03:49:00 +00:00
2018-02-03 02:38:10 -08:00
2015-10-13 05:28:54 -07:00
2015-10-13 05:28:54 -07:00
2017-04-06 03:29:38 -07:00
2016-12-14 06:03:14 -08:00
2017-03-10 19:52:31 -08:00
2015-01-20 20:56:43 +00:00