summaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-axp288.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2017-12-22 07:36:16 -0500
committerChanwoo Choi <cw00.choi@samsung.com>2018-01-02 20:12:59 -0500
commitca90a64dc671f4a18958078a4bf2e31e2ef57db9 (patch)
tree650dc3a53c51533793d7451024370b9193294a46 /drivers/extcon/extcon-axp288.c
parent60ed99961469a3683b52d09bc0771053fb484ae0 (diff)
extcon: axp288: Handle reserved charger-type values better
According to the data sheets all the values not handled in the switch-case are "reserved". Update the dev_warn message to reflect this and set the cable-type to EXTCON_CHG_USB_SDP (so max 500mA current draw) as safe default. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-axp288.c')
-rw-r--r--drivers/extcon/extcon-axp288.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
index 74d5be0b1f35..0a44d43802fe 100644
--- a/drivers/extcon/extcon-axp288.c
+++ b/drivers/extcon/extcon-axp288.c
@@ -205,8 +205,8 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
205 cable = EXTCON_CHG_USB_DCP; 205 cable = EXTCON_CHG_USB_DCP;
206 break; 206 break;
207 default: 207 default:
208 dev_warn(info->dev, 208 dev_warn(info->dev, "unknown (reserved) bc detect result\n");
209 "disconnect or unknown or ID event\n"); 209 cable = EXTCON_CHG_USB_SDP;
210 } 210 }
211 211
212no_vbus: 212no_vbus: