From: Jaehoon Chung Date: Thu, 20 Apr 2017 10:53:25 +0000 (+0900) Subject: extcon: max77843: control the JIG pin by Auto detection X-Git-Tag: submit/tizen/20170421.012531^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30f8f2991aa0c3119cc5d6b6b1b5e3fc0dcc2946;p=platform%2Fkernel%2Flinux-exynos.git extcon: max77843: control the JIG pin by Auto detection 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 Signed-off-by: Jaehoon Chung --- diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c index e4e6ce800a60..126cf62fa083 100644 --- a/drivers/extcon/extcon-max77843.c +++ b/drivers/extcon/extcon-max77843.c @@ -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,