Loading drivers/power/supply/qcom/smb138x-charger.c +8 −4 Original line number Diff line number Diff line Loading @@ -577,13 +577,15 @@ static int smb138x_parallel_get_prop(struct power_supply *psy, rc = smblib_get_usb_suspend(chg, &val->intval); break; case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMITED: if (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) if ((chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) || (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN_EXT)) rc = smblib_get_prop_input_current_limited(chg, val); else val->intval = 0; break; case POWER_SUPPLY_PROP_CURRENT_MAX: if (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) if ((chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) || (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN_EXT)) rc = smblib_get_charge_param(chg, &chg->param.usb_icl, &val->intval); else Loading Loading @@ -669,7 +671,8 @@ static int smb138x_parallel_set_prop(struct power_supply *psy, rc = smb138x_set_parallel_suspend(chip, (bool)val->intval); break; case POWER_SUPPLY_PROP_CURRENT_MAX: if (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) if ((chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) || (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN_EXT)) rc = smblib_set_charge_param(chg, &chg->param.usb_icl, val->intval); break; Loading Loading @@ -1484,7 +1487,8 @@ static int smb138x_slave_probe(struct smb138x *chip) goto cleanup; } if (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) { if ((chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) || (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN_EXT)) { rc = smb138x_init_vbus_regulator(chip); if (rc < 0) { pr_err("Couldn't initialize vbus regulator rc=%d\n", Loading Loading
drivers/power/supply/qcom/smb138x-charger.c +8 −4 Original line number Diff line number Diff line Loading @@ -577,13 +577,15 @@ static int smb138x_parallel_get_prop(struct power_supply *psy, rc = smblib_get_usb_suspend(chg, &val->intval); break; case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMITED: if (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) if ((chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) || (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN_EXT)) rc = smblib_get_prop_input_current_limited(chg, val); else val->intval = 0; break; case POWER_SUPPLY_PROP_CURRENT_MAX: if (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) if ((chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) || (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN_EXT)) rc = smblib_get_charge_param(chg, &chg->param.usb_icl, &val->intval); else Loading Loading @@ -669,7 +671,8 @@ static int smb138x_parallel_set_prop(struct power_supply *psy, rc = smb138x_set_parallel_suspend(chip, (bool)val->intval); break; case POWER_SUPPLY_PROP_CURRENT_MAX: if (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) if ((chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) || (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN_EXT)) rc = smblib_set_charge_param(chg, &chg->param.usb_icl, val->intval); break; Loading Loading @@ -1484,7 +1487,8 @@ static int smb138x_slave_probe(struct smb138x *chip) goto cleanup; } if (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) { if ((chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN) || (chip->dt.pl_mode == POWER_SUPPLY_PL_USBIN_USBIN_EXT)) { rc = smb138x_init_vbus_regulator(chip); if (rc < 0) { pr_err("Couldn't initialize vbus regulator rc=%d\n", Loading