commit | 74ee13f8a9fc8e8ea9c9703b02975ec87e47e45a | [log] [tgz] |
---|---|---|
author | Pavan Holla <pholla@chromium.org> | Fri Jan 19 17:20:55 2024 |
committer | Pavan Holla <pholla@chromium.org> | Thu Jan 25 22:49:58 2024 |
tree | aeab6030314e383eb615edc0861245cad51c9f30 | |
parent | cb7c55da6199be35f9e2d3ab7faf36e5c2f1e122 [diff] |
ppm_common: Improved error handling 1) If cci.error is set, cci.complete will also be set. 2) If an unexpected ACK command is received, PPM will set the error and cmd_complete bits. It will also clear pending before notifying the OS. The PPM state will be restored to the state before the ACK was received. BUG=b:319124643 TEST=make local_tests Change-Id: I89a4e1f8b78d8121a0eff54eca5c6726fe70430b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/usb/um_ppm/+/5214908 Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@google.com> Commit-Queue: Pavan Holla <pholla@google.com> Tested-by: Pavan Holla <pholla@google.com>
Usermode UCSI PPM implementation for evaluation and testing usage. Try using this with the ucsi_um_test
kernel driver.
For usermode implementations, we use libi2c and libgpiod to provide an smbus implementation. You will need the right libraries to build:
sudo apt-get install libi2c-dev libgpiod-dev
┌─────────┐ │OPM │ │kernel or│ │cli │ └────┬────┘ │ │ ▼ ┌───────────┐ ┌────────┐ │ PD Driver │ │ ├────►│ │ │ PPM │ ├───────────┤ │ │ │ │ └────────┘ │ I2C Driver│ └───────────┘
The usermode ppm implementation consists of the PPM task, the PD driver and the I2C driver backing it. The OPM will either be a CLI (for locally triggering some functionality) or the ucsi_um_test
kernel module.