Commit 9fc83373 authored by Andrei Kuchynski's avatar Andrei Kuchynski Committed by Tzung-Bi Shih
Browse files

platform/chrome: cros_ec_typec: Add support for setting USB mode via sysfs



This patch implements USB mode setting via a sysfs interface in
cros_ec_typec driver. User-space applications can now change the current
USB mode by writing to "usb_mode" sysfs entry, replacing the previous
ioctl-based method.
The embedded controller (EC) currently supports only entering USB4 mode
and exiting all modes (including altmodes). Both of these operations
trigger Data Reset Message, even if no USB Mode is active.
Additionally, the patch exposes the USB modes supported by the port via
"usb_capability" sysfs attribute.

Signed-off-by: default avatarAndrei Kuchynski <akuchynski@chromium.org>
Link: https://lore.kernel.org/r/20250210130419.4110130-1-akuchynski@chromium.org


Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
parent 435a3d78
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment