From c29d7d5bfc965bacb07d56449e2a1a189544fe28 Mon Sep 17 00:00:00 2001 From: flar2 Date: Sat, 26 Mar 2016 13:26:50 -0400 Subject: [PATCH] otg+charge: detect charging while OTG enabled Thanks solidxsnake13224 on xda-developers.com --- drivers/power/bq27541_battery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/power/bq27541_battery.c b/drivers/power/bq27541_battery.c index 7e81921963c8..6eba6ddb2825 100644 --- a/drivers/power/bq27541_battery.c +++ b/drivers/power/bq27541_battery.c @@ -613,7 +613,8 @@ static int bq27541_get_psp(int reg_offset, enum power_supply_property psp, if (psp == POWER_SUPPLY_PROP_STATUS) { ret = bq27541_device->bat_status = rt_value; - if ((ac_on || usb_on || wireless_on) && !otg_on) {/* Charging detected */ + //otg+charge - allow charging while otg + if ((ac_on || usb_on || wireless_on)/* && !otg_on*/) {/* Charging detected */ if (bq27541_device->old_capacity == 100) { val->intval = POWER_SUPPLY_STATUS_FULL; } else {