The Nexus One data pins are in the SE1 state until vbus is powered.
Ignore the SE1 bit to fix host mode detection when a Nexus One is
attached.
Change-Id: Ia2314b26acdb1d20fa0a43812f88c232c919cba3
Signed-off-by: Benoit Goby <benoit@android.com>
CPCAP_BIT_SESSVLD_S)
#define SENSE_USB_HOST (CPCAP_BIT_ID_GROUND_S)
+#define SENSE_USB_HOST_MASK (~CPCAP_BIT_SE1_S)
#define SENSE_FACTORY (CPCAP_BIT_ID_FLOAT_S | \
CPCAP_BIT_ID_GROUND_S | \
/* Special handling of USB undetect. */
data->state = USB;
- } else if (data->sense == SENSE_USB_HOST) {
+ } else if ((data->sense & SENSE_USB_HOST_MASK) == SENSE_USB_HOST) {
whisper_notify(data, CPCAP_ACCY_USB_HOST);
cpcap_irq_unmask(data->cpcap, CPCAP_IRQ_IDFLOAT);