commit | 5ef113f5a7cbec2da5c011dc024ef1683345801e | [log] [tgz] |
---|---|---|
author | Abhishek Pandit-Subedi <abhishekpandit@google.com> | Thu Jan 04 06:14:29 2024 |
committer | George Engelbrecht <engeg@google.com> | Fri Jan 05 21:58:17 2024 |
tree | 77979ded44aad236c2bbd561ac2cbeba989d43f5 | |
parent | d7173ab8417ac5013e0b570802a3f49eabc47cd5 [diff] |
Extract PPM implementation out of pd driver The PD driver should only contain implementation specific to that PD hardware and a PPM driver should handle all the PPM states instead. This will make it easier to write tests to validate the PPM state machine. BUG=b:303919041 Change-Id: I331f2cc706ee8a683c9426c1b972919accf6d5f5
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.