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

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

Merge "power: qg: Expose cc soc value through power supply property"

parents 59eb599c 7b725580
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -389,6 +389,7 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(main_fcc_max),
	POWER_SUPPLY_ATTR(fg_reset),
	POWER_SUPPLY_ATTR(qc_opti_disable),
	POWER_SUPPLY_ATTR(cc_soc),
	/* Charge pump properties */
	POWER_SUPPLY_ATTR(cp_status1),
	POWER_SUPPLY_ATTR(cp_status2),
+4 −0
Original line number Diff line number Diff line
@@ -1869,6 +1869,9 @@ static int qg_psy_get_property(struct power_supply *psy,
	case POWER_SUPPLY_PROP_SOH:
		pval->intval = chip->soh;
		break;
	case POWER_SUPPLY_PROP_CC_SOC:
		rc = qg_get_cc_soc(chip, &pval->intval);
		break;
	default:
		pr_debug("Unsupported property %d\n", psp);
		break;
@@ -1921,6 +1924,7 @@ static enum power_supply_property qg_psy_props[] = {
	POWER_SUPPLY_PROP_ESR_NOMINAL,
	POWER_SUPPLY_PROP_SOH,
	POWER_SUPPLY_PROP_FG_RESET,
	POWER_SUPPLY_PROP_CC_SOC,
};

static const struct power_supply_desc qg_psy_desc = {
+1 −0
Original line number Diff line number Diff line
@@ -320,6 +320,7 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_MAIN_FCC_MAX,
	POWER_SUPPLY_PROP_FG_RESET,
	POWER_SUPPLY_PROP_QC_OPTI_DISABLE,
	POWER_SUPPLY_PROP_CC_SOC,
	/* Charge pump properties */
	POWER_SUPPLY_PROP_CP_STATUS1,
	POWER_SUPPLY_PROP_CP_STATUS2,