Commit b0a76d0c authored by Philippe De Swert's avatar Philippe De Swert

Use mass_storage also as fake charging mode with android gadget

Seems an empty android gadget only enumerates if some configuration had
been used before. Fix this by using mass_storage to make a similar fake
mass_storage device as used with normal modules.

[usb-moded] Use fake mass_storage for android gadget charging mode. Fixes: JB#8277
Signed-off-by: default avatarPhilippe De Swert <philippe.deswert@jollamobile.com>
parent 94f76bd0
......@@ -89,9 +89,9 @@ int set_android_charging_mode(void)
{
int ret = 0;
/* disable, set functions to "null", re-enable */
/* disable, set functions to "mass_storage", re-enable */
write_to_file("/sys/class/android_usb/android0/enable", "0");
write_to_file("/sys/class/android_usb/android0/functions", "null");
write_to_file("/sys/class/android_usb/android0/functions", "mass_storage");
ret = write_to_file("/sys/class/android_usb/android0/enable", "1");
if(ret < 0)
return(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment