Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdc5fd88 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb1355: support ONLINE property in parallel psy"

parents a5395c4d a2dda1f6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -522,6 +522,7 @@ static int smb1355_parse_dt(struct smb1355 *chip)

static enum power_supply_property smb1355_parallel_props[] = {
	POWER_SUPPLY_PROP_CHARGE_TYPE,
	POWER_SUPPLY_PROP_ONLINE,
	POWER_SUPPLY_PROP_CHARGING_ENABLED,
	POWER_SUPPLY_PROP_PIN_ENABLED,
	POWER_SUPPLY_PROP_INPUT_SUSPEND,
@@ -605,6 +606,7 @@ static int smb1355_parallel_get_prop(struct power_supply *psy,
		rc = smb1355_get_prop_batt_charge_type(chip, val);
		break;
	case POWER_SUPPLY_PROP_CHARGING_ENABLED:
	case POWER_SUPPLY_PROP_ONLINE:
		rc = smb1355_read(chip, BATTERY_STATUS_3_REG, &stat);
		if (rc >= 0)
			val->intval = (bool)(stat & ENABLE_CHARGING_BIT);