USB HAL: Bind UDC to ConfigFS when re-added

Upon role switch to host mode, the upstream DWC3 driver completely
removes the UDC device.  If a composition switch then occurs, the
ConfigFS driver cannot bind to the UDC as it is not present.
For ADB-enabled compositions this is mitigated because the ADBD
daemon has a retry mechanism and will trigger sys.usb.ffs.ready=1
on each attempt which will kick init.qcom.usb.rc rules to re-execute
the composition rules (or MonitorFfs if UsbGadget HAL is used).

However for non-ADB compositions, there is no mechanism to attempt
to re-bind the UDC once the controller role is switched back to
device mode, causing enumeration failure as there is no active
gadget driver.  Fix this by performing the bind write in the HAL's
uevent handler upon UDC device add.  While at it, consolidate this to
occur with the sys.usb.adb.disabled property handling which occurs
similarly upon UDC add/removal.

Change-Id: Ic2df76d83d8b7d0d138cbb72c42564617708accc
1 file changed
tree: 65283a80362f40c5c1b83cf3a9a927078b72ab5e
  1. etc/
  2. hal/
  3. vendor_product.mk