commit | 5178dd053d219289bae70e9b9f6529b62249e863 | [log] [tgz] |
---|---|---|
author | Abhishek Pandit-Subedi <abhishekpandit@google.com> | Fri Jan 12 19:16:55 2024 |
committer | Abhishek Pandit-Subedi <abhishekpandit@google.com> | Thu Jan 18 00:26:15 2024 |
tree | 9b23713d1b803215bdecc937b8f821f2f118359d | |
parent | 7fa362b0af4c68755dcf4cf0bc6ced1f59622e6f [diff] |
Support errors from the PPM The PPM may want to intercept and return errors without going to the LPM (for example if there are command specific and state related errors). In such cases, add support for returning a PPM error status without going to the LPM. Also fixed a bunch of cases where we were returning errors in CCI but not returning error statuses from PPM. BUG=b:319124783 TEST=Loaded kernel driver with um_ppm; still needs unit tests Change-Id: I761c5d50ef20d239e034c1ae28c775eb0da6ddb0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/usb/um_ppm/+/5194043 Tested-by: Abhishek Pandit-Subedi <abhishekpandit@google.com> Reviewed-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.