commit | cb7c55da6199be35f9e2d3ab7faf36e5c2f1e122 | [log] [tgz] |
---|---|---|
author | Pavan Holla <pholla@chromium.org> | Tue Jan 16 17:49:45 2024 |
committer | Pavan Holla <pholla@chromium.org> | Thu Jan 25 22:49:45 2024 |
tree | 89fb909f0ca25cb9a675ad1a3f59d02328ed4621 | |
parent | 2212ac3a03e8e253b340f9b42777ee646a57ad8e [diff] |
ppm_tests: Implement a few unit tests Test 1) A full command loop. 2) OPM notification for an LPM alert 3) Misc error tests BUG=b:319124643 TEST=make local_tests Change-Id: I017da5f8a16f1be5f2920cfff1f1697a82487e6a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/usb/um_ppm/+/5201752 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.