summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2021-04-30 09:07:10 -0700
committerCommit Bot <commit-bot@chromium.org>2021-06-11 21:20:29 +0000
commit4a46ad60f03301f0184df4a0f977b02cfeb3a1f7 (patch)
tree8a69e9960bc058a88a0dfb8725d76108a62c645b /include/ec_commands.h
parentfae894230df4f0e34dc4f13c587ee4d721dfa812 (diff)
downloadchrome-ec-4a46ad60f03301f0184df4a0f977b02cfeb3a1f7.tar.gz
PCHG: Handle WLC_CHG_CTRL_DEVICE_STATE_DEVICE_DOCKED
We'll extend the period for a stylus to be statically charged so that EEPROM corruption can be avoided by not entering negotiated mode with a depleted battery. During this static charge period, the user currently doesn't see any charging indication. To prevent users from removing a stylus, we'll add a new state 'device docked' to ctn730. The EC firmware is updated to handle this new state as follows: - PCHG_STATE_DETECTED will be reused to indicate a device is in proximity but not ready for communication. - PCHG_STATE_CONNECTED will be added to indicate a device is ready for digital communication. This is formerly called DETECTED. - CTN730 driver produces PCHG_EVENT_DETECTED on 'docked' event and PCHG_EVENT_CONNECTED on 'detected' event. - When DEVICE_UNDOCKED is received in PCHG_STATE_DETECTED, transition to PCHG_STATE_ENABLED. BUG=b:189323070, b:173235954 BRANCH=trogdor TEST=Verify unpowered listener board can be detected. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I7fa83f6dd31cf74eab7c158e557ddc09f8976798 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2920628 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index c0bea49322..09592c8b96 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -6820,16 +6820,18 @@ enum pchg_state {
PCHG_STATE_INITIALIZED,
/* Charger is enabled and ready to detect a device. */
PCHG_STATE_ENABLED,
- /* Device is detected in proximity. */
+ /* Device is in proximity. */
PCHG_STATE_DETECTED,
/* Device is being charged. */
PCHG_STATE_CHARGING,
/* Device is fully charged. It implies DETECTED (& not charging). */
PCHG_STATE_FULL,
- /* In download (or firmware update) mode. Update session is closed. */
+ /* In download (a.k.a. firmware update) mode */
PCHG_STATE_DOWNLOAD,
- /* In download mode. Session is opened. Ready for receiving data. */
+ /* In download mode. Ready for receiving data. */
PCHG_STATE_DOWNLOADING,
+ /* Device is ready for data communication. */
+ PCHG_STATE_CONNECTED,
/* Put no more entry below */
PCHG_STATE_COUNT,
};
@@ -6843,6 +6845,7 @@ enum pchg_state {
[PCHG_STATE_FULL] = "FULL", \
[PCHG_STATE_DOWNLOAD] = "DOWNLOAD", \
[PCHG_STATE_DOWNLOADING] = "DOWNLOADING", \
+ [PCHG_STATE_CONNECTED] = "CONNECTED", \
}
/**