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

Commit e8615ac1 authored by Fenglin Wu's avatar Fenglin Wu Committed by Harry Yang
Browse files

power_supply: Add REAL_TYPE power_supply_property



Add REAL_TYPE power_supply property to record the real time charger
type.

Change-Id: I5fb2e3e3e782bcac0f8dd6071a830bcf370ebbd4
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent c31b4ab9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -119,7 +119,8 @@ static ssize_t power_supply_show_property(struct device *dev,
	else if (off == POWER_SUPPLY_PROP_CAPACITY_LEVEL)
		return scnprintf(buf, PAGE_SIZE, "%s\n",
				capacity_level_text[value.intval]);
	else if (off == POWER_SUPPLY_PROP_TYPE)
	else if (off == POWER_SUPPLY_PROP_TYPE ||
			off == POWER_SUPPLY_PROP_REAL_TYPE)
		return scnprintf(buf, PAGE_SIZE, "%s\n",
				type_text[value.intval]);
	else if (off == POWER_SUPPLY_PROP_SCOPE)
@@ -308,6 +309,7 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(connector_health),
	POWER_SUPPLY_ATTR(ctm_current_max),
	POWER_SUPPLY_ATTR(hw_current_max),
	POWER_SUPPLY_ATTR(real_type),
	/* Local extensions of type int64_t */
	POWER_SUPPLY_ATTR(charge_counter_ext),
	/* Properties of type `const char *' */
+1 −0
Original line number Diff line number Diff line
@@ -247,6 +247,7 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_CONNECTOR_HEALTH,
	POWER_SUPPLY_PROP_CTM_CURRENT_MAX,
	POWER_SUPPLY_PROP_HW_CURRENT_MAX,
	POWER_SUPPLY_PROP_REAL_TYPE,
	/* Local extensions of type int64_t */
	POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
	/* Properties of type `const char *' */