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

Commit fe37b5eb authored by Roy Luo's avatar Roy Luo
Browse files

Configure USB gadget maximum power

The default 2mA would be applied if the field is left
unconfigured. Configure the gadget to use full power.

Test: boot to userspace fastbootd and recovery
Bug: 277022505
Change-Id: I18abd98b62f5ce8d35062debad8100d87140bdba
parent d97f317e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ on fs && property:sys.usb.configfs=1
    mkdir /config/usb_gadget/g1/functions/ffs.adb
    mkdir /config/usb_gadget/g1/functions/ffs.fastboot
    mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell
    # Set current limit to 900mA (b/277022505)
    write /config/usb_gadget/g1/configs/b.1/MaxPower 0x384
    mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell

on fs && property:sys.usb.configfs=0