From: Greg Meiste Date: Tue, 7 Sep 2010 14:48:44 +0000 (-0500) Subject: mfd: cpcap-whisper: Fix defect introduced by I2c374a98 X-Git-Tag: firefly_0821_release~9834^2~569 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=58dee8e83f03bcf23bdada4c718935337a64e1c5;p=firefly-linux-kernel-4.4.55.git 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 --- 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: