Merge "smb138x: support usbin-usbin with external rsense"
This commit is contained in:
commit
ad7c7b10d1
1 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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…
Add table
Reference in a new issue