From: Greg Meiste Date: Fri, 13 Aug 2010 18:16:50 +0000 (-0500) Subject: mfd: cpcap-whisper: Tweak to support real Whisper docks X-Git-Tag: firefly_0821_release~9834^2~700 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d7904f2cbb2ad4556820fd9fed64691625703217;p=firefly-linux-kernel-4.4.55.git mfd: cpcap-whisper: Tweak to support real Whisper docks The real Whisper basic dock behaves a bit different than the prototype. Detection must be tweaked to properly detect the accessory when it is plugged into the wall. Change-Id: I7e2c4708b7c6642c3b58ebed199632be59804740 Signed-off-by: Greg Meiste Signed-off-by: Nick Pelly --- diff --git a/drivers/mfd/cpcap-whisper.c b/drivers/mfd/cpcap-whisper.c index 9f11195eb23d..f8225cf994c7 100644 --- a/drivers/mfd/cpcap-whisper.c +++ b/drivers/mfd/cpcap-whisper.c @@ -48,6 +48,8 @@ CPCAP_BIT_VBUSVLD_S | \ CPCAP_BIT_SESSVLD_S) +#define SENSE_WHISPER_SPD (CPCAP_BIT_SE1_S) + #define SENSE_WHISPER_PPD (0) #define SENSE_WHISPER_SMART (CPCAP_BIT_ID_GROUND_S | \ @@ -405,7 +407,8 @@ static void whisper_det_work(struct work_struct *work) whisper_notify(data, CPCAP_ACCY_USB_HOST); cpcap_irq_unmask(data->cpcap, CPCAP_IRQ_IDFLOAT); - } else if (data->sense == SENSE_WHISPER_PPD) { + } else if ((data->sense == SENSE_WHISPER_SPD) || + (data->sense == SENSE_WHISPER_PPD)) { gpio_set_value(data->pdata->pwr_gpio, 1); /* Extra identification step for Whisper. */