extcon: max77843: control the JIG pin by Auto detection 98/126198/3 accepted/tizen/unified/20170421.042254 submit/tizen/20170421.012531 tizen_4.0.m1_release
authorJaehoon Chung <jh80.chung@samsung.com>
Thu, 20 Apr 2017 10:53:25 +0000 (19:53 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 21 Apr 2017 00:31:45 +0000 (17:31 -0700)
Control the JIG pin by Auto dection.

Coontrol3 register has JIGset[1:0].
00: JIG pin controlled by Auto detection
01: JIG pin Output Low
10 to 11 : JIG pin Hi-Impedance

This patch is for fixing 'poweroff" issue.
- Download the some image
- After downloading the image, rebooting target.
- Press the poweroff, it runs 'reboot' instead of 'poweroff'

Change-Id: Ie17a46f79f2b4da6bbffc7d57feaddc7524b3524
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/extcon/extcon-max77843.c

index e4e6ce8..126cf62 100644 (file)
@@ -783,6 +783,14 @@ static int max77843_muic_probe(struct platform_device *pdev)
                return ret;
        }
 
+       /* JIG pin controlled by Auto detection */
+       ret = regmap_update_bits(max77843->regmap_muic,
+                       MAX77843_MUIC_REG_CONTROL3,
+                       MAX77843_MUIC_CONTROL3_JIGSET_MASK,
+                       0 << CONTROL3_JIGSET_SHIFT);
+       if (ret)
+               dev_warn(&pdev->dev, "Failed to update MUIC_REG_CONTRO3\n");
+
        /* Turn off auto detection configuration */
        ret = regmap_update_bits(max77843->regmap_muic,
                        MAX77843_MUIC_REG_CONTROL4,