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

Commit 8cc26228 authored by Chandana Kishori Chiluveru's avatar Chandana Kishori Chiluveru Committed by Gerrit - the friendly Code Review server
Browse files

usb: dwc3-msm: Add support to change USB modes using sysfs



Driver supports DRD mode and mode is changed based on
usb power_supply notification for ID and BSV changes.
This works fine for primary USB port as only one instance
of psy can exist. For other USB ports allow user to change
change modes using sysfs attribute 'mode'. This requires
user to pass qcom,psy-not-used DT attribute to handle
probe error due to duplicate registration of usb_psy.

Example commands to change the mode:
echo peripheral > /sys/devices/soc/6a00000.ssusb/mode (Device)
echo host > /sys/devices/soc/6a00000.ssusb/mode (Host)
echo none > /sys/devices/soc/6a00000.ssusb/mode (Disconnect)

Change-Id: I69b4c822d194cdd93cb77dbbf79e420bdee597d7
Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent a780366c
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