Fixes to get kernel driver initialized

Two major fixes:
* The chardev notify loop should have been sending lpm_alert and not
  notifying the kernel.
* PPM to OPM uses the message_in buffer and not message_out.

BUG=b:303919041

Change-Id: Id445ce3742db39e8fdb29e94a3ff151d11c00ea6
2 files changed
tree: 3465473f8d17ce86c9c81f14006d4e38afd26936
  1. include/
  2. LICENSE
  3. main.c
  4. Makefile
  5. platform_usermode.c
  6. README.md
  7. rts5453.c
  8. rts5453.h
  9. smbus_usermode.c
  10. smbus_usermode.h
  11. um_ppm_chardev.c
  12. um_ppm_chardev.h
README.md

Usermode PPM implementation

Usermode UCSI PPM implementation for evaluation and testing usage. Try using this with the ucsi_um_test kernel driver.

Setup

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

Architecture

┌─────────┐
│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.