From 58dee8e83f03bcf23bdada4c718935337a64e1c5 Mon Sep 17 00:00:00 2001 From: Greg Meiste Date: Tue, 7 Sep 2010 09:48:44 -0500 Subject: [PATCH] mfd: cpcap-whisper: Fix defect introduced by I2c374a98 Fix issue where the ID Float interrupt may occur during the 200ms where state is set to USB_POWER, causing the state machine to get into a bad state. Change-Id: I99e7b5de84f4b091c5b6e4f3e522876561603b61 Signed-off-by: Greg Meiste --- drivers/mfd/cpcap-whisper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/cpcap-whisper.c b/drivers/mfd/cpcap-whisper.c index 64c0bec0a730..45996b890f4d 100644 --- a/drivers/mfd/cpcap-whisper.c +++ b/drivers/mfd/cpcap-whisper.c @@ -418,7 +418,6 @@ static void whisper_det_work(struct work_struct *work) } 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); data->state = USB_POWER; schedule_delayed_work(&data->work, msecs_to_jiffies(200)); @@ -496,6 +495,7 @@ static void whisper_det_work(struct work_struct *work) case USB_POWER: gpio_set_value(data->pdata->pwr_gpio, 1); data->state = CONFIG; + cpcap_irq_unmask(data->cpcap, CPCAP_IRQ_IDFLOAT); break; case WHISPER: -- 2.34.1