adds sysfs interfaces that allows charging while in otg #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During the galaxy s3 days samsung sold an "audiodock" with the model number EDD-D200BEGSTA, it very likely houses an audio card that would only power from micro usb connected to the dock. It IDs itself with a 64.9K ohm resister on id pin, and once a samsung device detects it, it will go into a special dock mode where usb data pins are in host mode, but vbus would stay as a client device, effectively "otg while charging".
I'm a little scared of this however, because I don't know why samsung disabled the audiodock in dts (same for s6, driver support is there but disabled in dts).
To enable audiodock (id - 64.9K ohm - gnd):
echo 1 > /sys/devices/virtual/sec/switch/force_enable_audiodock
Other than that, this commit also allows one to spoof normal otg as audiodock. That would allow an OTG cable with an active vbus but without a resister mod to provide charging to the device with otg enabled. The active vbus would also be powering client devices.
To enable otg audiodock spoofing:
echo 1 > /sys/devices/virtual/sec/switch/force_otg_audiodock