platform/chrome: cros_ec_sysfs: Expose PD mux status

This adds sysfs attribute /sys/class/chromeos/cros_ec/usbpdmuxinfo
to expose the PD mux status for each Type-C port.
This allows user-space applications to easily determine
the current mux state without using ioctls.

Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Link: https://lore.kernel.org/r/20250203125947.2701106-2-akuchynski@chromium.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
This commit is contained in:
Andrei Kuchynski
2025-02-03 12:59:46 +00:00
committed by Tzung-Bi Shih
parent d83c45aeec
commit e6a3215f78
2 changed files with 71 additions and 0 deletions

View File

@@ -31,3 +31,16 @@ Date: August 2015
KernelVersion: 4.2
Description:
Show the information about the EC software and hardware.
What: /sys/class/chromeos/cros_ec/usbpdmuxinfo
Date: February 2025
Description:
Show PD mux status for each typec port with following flags:
- "USB": USB connected
- "DP": DP connected
- "POLARITY": CC line Polarity inverted
- "HPD_IRQ": Hot Plug Detect interrupt is asserted
- "HPD_LVL": Hot Plug Detect level is asserted
- "SAFE": DP is in safe mode
- "TBT": TBT enabled
- "USB4": USB4 enabled