RFC: lsucpd for listing typec and USB-C PD information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The lsucpd command line utility will list local USB-C ports (e.g. each
female USB-C connector on a laptop) with one line output for each port.
Note that not all USB-C ports support PD. For those ports that do support
PD that are also connected to another USB-C PD device, a "port<n>-partner"
is shown to the right of each line output by lsucpd. The direction that
power is flowing is indicated by "====>>" or "<<====" between each
port<n> and port<n>-partner.

Project Status
--------------
Can do:
    - show relationship between USB Type C objects (e.g. port0 and
      port1-partner) and "usb_power_delivery" objects (e.g. pd1 and pd7)
    - show the source and sink capabilities of both ends of existing
      PD connections
Cannot do (yet):
    - show the PD contract that is active. In USB PD jargon this requires
      the active RDO to be visible via sysfs
    - output JSON instead of plain text
    - show the actual voltage and current (and its direction) at the
      time this utility is executed

Warning:
--------
This project should be regarded as "work-in-progress" due to its immaturity
and the kernel support could be summarized as "shaky". Often after removing
and reconnecting USB-C cables carrying power, the ucsi_acpi and typec_ucsi
modules need to be removed then re-installed on the test platform. That
does not inspire confidence.

Code
----
Build and install instructions plus some binaries can be found at the
bottom of the README at: https://github.com/doug-gilbert/lsucpd

The code at that location includes a manpage with examples.

Feedback welcome.

Doug Gilbert



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux