Files
OpenCellular/util
Daisuke Nojiri 4ff544a573 Add host command to get PD chip information
This patch adds a host command to get PD chip info.

For PS8751, tcpci_get_chip_info will fail if the chip is in
low power mode. It can be woken up by reading a random register
first then wait for 10ms.

This code doesn't have the wake-up read to avoid 10ms delay.
Instead, we call this function immediately after the chip is
initialized because it'll gurantee the chip is awake.

Once it's called, the chip info will be stored in cache, which
can be accessed by tcpc_get_chip_info without worrying about
chip states.

localhost ~ # ectool pdchipinfo 0
vendor_id: 0xaaaa
product_id: 0x3429
device_id: 0xad
fw_version: 0x15

localhost ~ # ectool pdchipinfo 1
vendor_id: 0x1da0
product_id: 0x8751
device_id: 0x1
fw_version: 0x37

BUG=chrome-os-partner:62383
BRANCH=none
TEST=ectool pdchipinfo 0/1. make buildall

Change-Id: I3f1667d00ce1826936d90882ada1df6ed6b0ea37
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433166
2017-02-09 22:50:50 -08:00
..
2016-06-02 17:02:51 -07:00
2017-02-07 02:44:57 +00:00
2013-07-01 16:14:16 -07:00
2015-06-18 19:07:00 +00:00
2015-12-08 12:28:57 -08:00
2016-11-15 17:41:56 -08:00
2016-11-15 17:41:56 -08:00
2016-02-10 18:19:24 -08:00
2012-11-01 14:09:34 -07:00
2017-01-31 21:58:36 -08:00
2016-02-05 06:02:49 -08:00
2014-02-17 17:35:43 +00:00
2014-01-15 04:52:54 +00:00
2016-02-05 06:02:49 -08:00