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

Commit e419098d authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy Committed by Mark Salyzyn
Browse files

ANDROID: GKI: power_supply: Add local extensions of string property names properly



For displaying local extensions of properties in string format,
add them between MODEL_NAME and SERIAL_NUMBER. Otherwise, those
properties would be represented as integer.

Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
(cherry picked from commit ee0f7c41)
Signed-off-by: default avatarMark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Iddb34d7ee6f520b789bc2e085ada4053343538f0
parent e58a0534
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -466,9 +466,9 @@ static struct device_attribute power_supply_attrs[] = {
	/* Properties of type `const char *' */
	POWER_SUPPLY_ATTR(model_name),
	POWER_SUPPLY_ATTR(manufacturer),
	POWER_SUPPLY_ATTR(serial_number),
	POWER_SUPPLY_ATTR(battery_type),
	POWER_SUPPLY_ATTR(cycle_counts),
	POWER_SUPPLY_ATTR(serial_number),
};

static struct attribute *
+5 −1
Original line number Diff line number Diff line
@@ -338,9 +338,13 @@ enum power_supply_property {
	/* Properties of type `const char *' */
	POWER_SUPPLY_PROP_MODEL_NAME,
	POWER_SUPPLY_PROP_MANUFACTURER,
	POWER_SUPPLY_PROP_SERIAL_NUMBER,
	POWER_SUPPLY_PROP_BATTERY_TYPE,
	POWER_SUPPLY_PROP_CYCLE_COUNTS,
	/*
	 * Add local extensions for properties with string values between
	 * MODEL_NAME and SERIAL_NUMBER. Don't add below SERIAL_NUMBER.
	 */
	POWER_SUPPLY_PROP_SERIAL_NUMBER,
};

enum power_supply_type {