mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 02:20:48 +00:00
Every time a type-C source is plugged in, send a special VDM to read device info. Device info will contain RW Hash (sha1), a unique hardware descriptor (USB_PD_HARDWARE_DEVICE_ID), a software version number just for debugging (USB_PD_DBG_SW_VERSION), and a flag for if the device is in RW. This feature is off by default and can be turned on by defining CONFIG_USB_PD_READ_INFO_ON_CONNECT, currently defined for samus and ryu only. Renamed the read RW_HASH VDM to READ_INFO since it now returns more than just the hash. When device info is received, we store the RW hash. In the future we will use this to check if device needs an update. BUG=chrome-os-partner:31361 BRANCH=none TEST=load onto a samus and a zinger. test when you attach zinger we send a VDM, and we get device info printed to console. also use "pd 0 hash" to query last hash received. Change-Id: I0ca57651cf8506ea738b080a6cf8e7b020ef8724 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/213832 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org>