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:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment