New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 624041 link

Starred by 2 users

Issue metadata

Status: Verified
Owner: ----
Closed: Dec 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Charge state machine polls every second even when discharging in S5

Project Member Reported by rspangler@chromium.org, Jun 28 2016

Issue description

The end of the charger task does this:

		/* How long to sleep? */
		if (problems_exist)
			/* If there are errors, don't wait very long. */
			sleep_usec = CHARGE_POLL_PERIOD_SHORT;
		else if (sleep_usec <= 0) {
			/* default values depend on the state */
			if (curr.state == ST_IDLE ||
			    curr.state == ST_DISCHARGE) {
				/* If AP is off, we can sleep a long time */
				if (chipset_in_state(CHIPSET_STATE_ANY_OFF |
						     CHIPSET_STATE_SUSPEND))
					sleep_usec =
						CHARGE_POLL_PERIOD_VERY_LONG;
				else
					/* Discharging, not too urgent */
					sleep_usec = CHARGE_POLL_PERIOD_LONG;
			} else {
				/* Charging, so pay closer attention */
				sleep_usec = CHARGE_POLL_PERIOD_CHARGE;
			}
		}

		/* Adjust for time spent in this loop */
		sleep_usec -= (int)(get_time().val - curr.ts.val);
		if (sleep_usec < CHARGE_MIN_SLEEP_USEC)
			sleep_usec = CHARGE_MIN_SLEEP_USEC;
		else if (sleep_usec > CHARGE_MAX_SLEEP_USEC)
			sleep_usec = CHARGE_MAX_SLEEP_USEC;


CHARGE_POLL_PERIOD_VERY_LONG is 60 seconds

But CHARGE_MAX_SLEEP_USEC is 1 second, so we'll never actually sleep more than that.

This causes more battery I2C activity in S5/G3 than there should be, which increases power consumption in S5/G3.

Is there a reason why we capped it at a second, or can we change CHARGE_MAX_SLEEP_USEC to 60*SECOND?


 
That code was added >2 years ago in https://chromium-review.googlesource.com/#/c/191767/
I *think* we were just being careful. I strongly doubt that it would go from "Everything's fine" to "I'm way too hot, gonna explode" in 60 seconds, but I can't find any Samus-specific battery docs, and the lawyerbot has eaten any relevant emails.

If you can track down the battery datasheets, that would be helpful.


Project Member

Comment 3 by sheriffbot@chromium.org, Jul 17 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: OS>Kernel>Power
Components: OS>Firmware>EC
Status: Verified (was: Untriaged)
dupe of b/69695376 which got fixed a while back.

Sign in to add a comment