mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
otg+charge: detect charging while OTG enabled
Thanks solidxsnake13224 on xda-developers.com
This commit is contained in:
parent
c7956f4a0e
commit
c29d7d5bfc
1 changed files with 2 additions and 1 deletions
|
@ -613,7 +613,8 @@ static int bq27541_get_psp(int reg_offset, enum power_supply_property psp,
|
||||||
if (psp == POWER_SUPPLY_PROP_STATUS) {
|
if (psp == POWER_SUPPLY_PROP_STATUS) {
|
||||||
ret = bq27541_device->bat_status = rt_value;
|
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) {
|
if (bq27541_device->old_capacity == 100) {
|
||||||
val->intval = POWER_SUPPLY_STATUS_FULL;
|
val->intval = POWER_SUPPLY_STATUS_FULL;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue