From 0ccc7955acc19e7f4515e51993b7b95cf5a35fdc Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Wed, 30 Jul 2014 15:39:02 +0900 Subject: extcon: sm5502: Fix bug to check cable type This patch fix bug when checking cable type. SM5502 have to use ADC value to get correct cable type. Signed-off-by: Chanwoo Choi --- drivers/extcon/extcon-sm5502.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/extcon') diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c index 560d7dc..a1ba924 100644 --- a/drivers/extcon/extcon-sm5502.c +++ b/drivers/extcon/extcon-sm5502.c @@ -300,7 +300,7 @@ static unsigned int sm5502_muic_get_cable_type(struct sm5502_muic_info *info) * If ADC is SM5502_MUIC_ADC_GROUND(0x0), external cable hasn't * connected with to MUIC device. */ - cable_type &= SM5502_REG_ADC_MASK; + cable_type = adc & SM5502_REG_ADC_MASK; if (cable_type == SM5502_MUIC_ADC_GROUND) return SM5502_MUIC_ADC_GROUND; -- cgit v1.1