Add limitPowerTransfer API to IUsb
limitPowerTransfer is invoked to limit power transfer
in and out of the Usb port.
Bug: 199357330
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I5f4991d024ad827ae8148fc143a44cc05bafdcb4
diff --git a/usb/aidl/android/hardware/usb/IUsb.aidl b/usb/aidl/android/hardware/usb/IUsb.aidl
index 9a8f000..1596d9a 100644
--- a/usb/aidl/android/hardware/usb/IUsb.aidl
+++ b/usb/aidl/android/hardware/usb/IUsb.aidl
@@ -82,4 +82,17 @@
* @param transactionId ID to be used when invoking the callback.
*/
void switchRole(in String portName, in PortRole role, long transactionId);
+
+ /**
+ * This function is used to limit power transfer in and out of the port.
+ * When limited, the port does not charge from the partner port.
+ * Also, the port limits sourcing power to the partner port when the USB
+ * specification allows it to do so.
+ *
+ * @param portName name of the port for which power transfer is being limited.
+ * @param limit true limit power transfer.
+ * false relax limiting power transfer.
+ * @param transactionId ID to be used when invoking the callback.
+ */
+ void limitPowerTransfer(in String portName, boolean limit, long transactionId);
}