mfd: cpcap-whisper: Tweak to support real Whisper docks
authorGreg Meiste <w30289@motorola.com>
Fri, 13 Aug 2010 18:16:50 +0000 (13:16 -0500)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:33:36 +0000 (16:33 -0700)
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 <w30289@motorola.com>
Signed-off-by: Nick Pelly <npelly@google.com>
drivers/mfd/cpcap-whisper.c

index 9f11195eb23dfddf43da2f24285f423688c37b32..f8225cf994c7a773e6ef9f86a063afa848157a00 100644 (file)
@@ -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. */