smb138x-charger: expose CHARGE_TYPE in parallel psy
CHARGE_TYPE provides information about what state the parallel charger is in (pre, trickle, fast, full-on, taper). Expose it. Change-Id: Ieee5a3acf5bbcd66ca1789a1011bd8c9461657ef Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
This commit is contained in:
parent
91345c328b
commit
04fe8da8a6
1 changed files with 4 additions and 0 deletions
|
@ -397,6 +397,7 @@ static int smb138x_init_batt_psy(struct smb138x *chip)
|
|||
*****************************/
|
||||
|
||||
static enum power_supply_property smb138x_parallel_props[] = {
|
||||
POWER_SUPPLY_PROP_CHARGE_TYPE,
|
||||
POWER_SUPPLY_PROP_CHARGING_ENABLED,
|
||||
POWER_SUPPLY_PROP_PIN_ENABLED,
|
||||
POWER_SUPPLY_PROP_INPUT_SUSPEND,
|
||||
|
@ -417,6 +418,9 @@ static int smb138x_parallel_get_prop(struct power_supply *psy,
|
|||
u8 temp;
|
||||
|
||||
switch (prop) {
|
||||
case POWER_SUPPLY_PROP_CHARGE_TYPE:
|
||||
rc = smblib_get_prop_batt_charge_type(chg, val);
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CHARGING_ENABLED:
|
||||
rc = smblib_read(chg, BATTERY_CHARGER_STATUS_5_REG,
|
||||
&temp);
|
||||
|
|
Loading…
Add table
Reference in a new issue