BZ: 33225
This patch sets vbus draw current limitation in unconfig state,
no smaller than suspended state.
Change-Id: I28970325a20f9d220123f9d0e99cae90dcd80294
Signed-off-by: Wu, Hao <hao.wu@intel.com>
Reviewed-on: http://android.intel.com:8080/47679
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: Tang, Jianqiang <jianqiang.tang@intel.com>
Reviewed-by: Zhuang, Jin Can <jin.can.zhuang@intel.com>
Reviewed-by: Meng, Zhe <zhe.meng@intel.com>
Tested-by: Meng, Zhe <zhe.meng@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
unsigned power = gadget_is_otg(gadget) ? 8 : 100;
int tmp;
+#if defined(CONFIG_USB_GADGET_SUSPEND_VBUS_DRAW)
+ if (power < CONFIG_USB_GADGET_SUSPEND_VBUS_DRAW)
+ power = CONFIG_USB_GADGET_SUSPEND_VBUS_DRAW;
+#endif
+
if (cdev->config)
reset_config(cdev);