Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e0402850 authored by Jack Pham's avatar Jack Pham
Browse files

usb: pd: Support Android dual_role_usb sysfs class



Export an instance of the dual_role_usb class using the
provided helpers. This is an alternate set of sysfs nodes
that the Android framework uses to allow for user
interactive control of role switching.

Writing to the various properties achieves the following:
  - mode: toggles between UFP/Sink and DFP/Source via soft
        disconnect/reconnect without invoking PD.
  - power_role: toggles between Source and Sink modes via
        the PR_Swap operation
  - data_role: toggles between UFP (device) and DFP (host) via
        the DR_Swap operation

Android currently expects a single instance named "otg_default".

Change-Id: I7060b6f379bc8bed24b59d9df4ca2fb331437363
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 1e170076
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment