commit | 284505f59f2a0b138aedc91e70b27c9f14382d21 | [log] [tgz] |
---|---|---|
author | Pavan Holla <pholla@chromium.org> | Wed Jan 31 18:35:49 2024 |
committer | Pavan Holla <pholla@chromium.org> | Wed Jan 31 19:01:57 2024 |
tree | a19f8c121fb6f522a177e5fc95467e262df8bc3a | |
parent | eaa368a15a6ae8ea5df12aefda2ef22efd2a86aa [diff] |
ppm_common: Extract CCI error setting to a function BUG=b:319124783 TEST=make local_tests; um_ppm -v -b 22 -g 1 -l 2 -k /dev/ucsi_um_test-0 Change-Id: If793314c2149e70a9c7ddcbbcc68641d0a5ddc2c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/usb/um_ppm/+/5251770 Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@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.