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

Commit 7e111192 authored by Fenglin Wu's avatar Fenglin Wu Committed by Prasad Sodagudi
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 517207a7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -112,7 +112,8 @@ static ssize_t power_supply_show_property(struct device *dev,
	else if (off == POWER_SUPPLY_PROP_CAPACITY_LEVEL)
		return sprintf(buf, "%s\n",
			       power_supply_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 sprintf(buf, "%s\n",
			       power_supply_type_text[value.intval]);
	else if (off == POWER_SUPPLY_PROP_SCOPE)
@@ -253,6 +254,7 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(usb_otg),
	POWER_SUPPLY_ATTR(charge_enabled),
	POWER_SUPPLY_ATTR(set_ship_mode),
	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
@@ -155,6 +155,7 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_USB_OTG,
	POWER_SUPPLY_PROP_CHARGE_ENABLED,
	POWER_SUPPLY_PROP_SET_SHIP_MODE,
	POWER_SUPPLY_PROP_REAL_TYPE,
	/* Local extensions of type int64_t */
	POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
	/* Properties of type `const char *' */