mfd: cpcap-whisper: Ignore the SE1 bit to detect host mode

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>
This commit is contained in:
Benoit Goby 2010-08-11 16:53:42 -07:00 committed by Colin Cross
parent 7833216d52
commit efddedb611

View File

@ -42,6 +42,7 @@
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 | \
@ -403,7 +404,7 @@ static void whisper_det_work(struct work_struct *work)
/* 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);