From 094ce9019e8517b1d837d37daed6f4e5f4bd374b Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 6 Dec 2012 21:36:18 +0900 Subject: [PATCH] --- yaml --- r: 354951 b: refs/heads/master c: 0e2738f59c6db185a70a683059980bd2296571ca h: refs/heads/master i: 354949: 911411029e488ac5748b688c71ea6167c3946d65 354947: 2b336b657ebdfe03c2943821806214eec5b0119b 354943: c6895ebc13914748f5340350994c4020ba3cc58b v: v3 --- [refs] | 2 +- trunk/drivers/extcon/extcon-max77693.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4e0ea4154cd6..bdb8456c2445 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2b75799f5ae9f31ea9778003591fd295d3bc3159 +refs/heads/master: 0e2738f59c6db185a70a683059980bd2296571ca diff --git a/trunk/drivers/extcon/extcon-max77693.c b/trunk/drivers/extcon/extcon-max77693.c index abab068adc35..28eff88fca18 100644 --- a/trunk/drivers/extcon/extcon-max77693.c +++ b/trunk/drivers/extcon/extcon-max77693.c @@ -737,6 +737,7 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) switch (chg_type) { case MAX77693_CHARGER_TYPE_USB: + case MAX77693_CHARGER_TYPE_NONE: /* * MHL_TA(USB/TA) with MHL cable * - MHL cable include two port(HDMI line and separate micro @@ -778,6 +779,25 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info) goto out; } + /* + * When MHL(with USB/TA cable) or Dock-Audio with USB/TA cable + * is attached, muic device happen below two interrupt. + * - 'MAX77693_MUIC_IRQ_INT1_ADC' for detecting MHL/Dock-Audio. + * - 'MAX77693_MUIC_IRQ_INT2_CHGTYP' for detecting USB/TA cable + * connected to MHL or Dock-Audio. + * Always, happen eariler MAX77693_MUIC_IRQ_INT1_ADC interrupt + * than MAX77693_MUIC_IRQ_INT2_CHGTYP interrupt. + * + * If user attach MHL (with USB/TA cable and immediately detach + * MHL with USB/TA cable before MAX77693_MUIC_IRQ_INT2_CHGTYP + * interrupt is happened, USB/TA cable remain connected state to + * target. But USB/TA cable isn't connected to target. The user + * be face with unusual action. So, driver should check this + * situation in spite of, that previous charger type is N/A. + */ + if (chg_type == MAX77693_CHARGER_TYPE_NONE) + break; + /* Only USB cable, PATH:AP_USB */ ret = max77693_muic_set_path(info, CONTROL1_SW_USB, attached); if (ret < 0)