Merge "Configure USB gadget maximum power" am: 772939db8b am: db04d6a1e9 am: 66f35e60a5 am: a5b62f3dbe
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/2525019
Change-Id: I32c38dc2ad85fb9d98e47df6afa9e15e79056597
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/etc/init.rc b/etc/init.rc
index 03df27b..c7ff2b2 100644
--- a/etc/init.rc
+++ b/etc/init.rc
@@ -110,6 +110,8 @@
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