commit | 7fa362b0af4c68755dcf4cf0bc6ced1f59622e6f | [log] [tgz] |
---|---|---|
author | Abhishek Pandit-Subedi <abhishekpandit@google.com> | Wed Jan 10 23:34:34 2024 |
committer | Abhishek Pandit-Subedi <abhishekpandit@google.com> | Thu Jan 11 21:26:16 2024 |
tree | 8efeab28d575a26b562bd2da861619d1526b984c | |
parent | 88827905f8e26424fc61d9eb8ea80b5b9cde702e [diff] |
Fix alert handling and ACK_CC_CI The chip address read during ARA will tell you which port actually alerted. Instead of reading all ports, only read the ports that actually alerted and notify the OPM. This also fixes ACK_CC_CI on RTS by setting the port correctly and also clearing RTK bits (which we don't care about for UCSI). BUG=b:319124783 TEST=Run um_ppm with several hotplug events; verify mask is cleared. Change-Id: I631a69bf93c5024b6cfa97a86f06ba2cb073fed3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/usb/um_ppm/+/5187826 Reviewed-by: Jameson Thies <jthies@google.com> Tested-by: Abhishek Pandit-Subedi <abhishekpandit@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.