usb: dwc3-msm: Use ADC for ID pin detection

Configure ADC to periodically poll for the ID pin voltage. Register
for high and low voltage threshold notification in order to allow
for detecting when a micro-A cable is inserted or removed. This
notification will then be used to enter/exit OTG host mode.

Add module parameters to override the threshold levels as well as
the polling rate. These take effect when disable and enable is issued
to the "adc_enable" file in msm_dwc3's device node in sysfs.

Change-Id: Ibacb8f0f02bc94de8a3084e0b6673e3a4ca93f1d
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2 files changed