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

Commit 79c88a3b authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

qpnp-fg-gen3: export the battery float voltage



Implement VOLTAGE_MAX_DESIGN to expose the battery float voltage. This
property will reflect the values read from battery profile and will
will be used for setting the max voltage on charging chips.

Change-Id: I4b9028f8930ac2f3de6c043fa145494f37322160
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 67d71eb9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -800,6 +800,9 @@ static int fg_psy_get_property(struct power_supply *psy,
	case POWER_SUPPLY_PROP_BATTERY_TYPE:
		pval->strval = fg_get_battery_type(chip);
		break;
	case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
		pval->intval = chip->bp.float_volt_uv;
		break;
	default:
		break;
	}
@@ -861,6 +864,7 @@ static enum power_supply_property fg_psy_props[] = {
	POWER_SUPPLY_PROP_RESISTANCE,
	POWER_SUPPLY_PROP_BATTERY_TYPE,
	POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
	POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
};

static const struct power_supply_desc fg_psy_desc = {