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

Commit 53160878 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

power_supply: add battery_info and battery_info_id parameters



Add the following power supply parameters so that some battery
information can be stored based on the id passed and notified to
a power supply. These parameters will be typically used by the
userspace to notify some stored battery information back to the
driver to do some calculations.

- POWER_SUPPLY_PROP_BATTERY_INFO
- POWER_SUPPLY_PROP_BATTERY_INFO_ID

For example, if the battery_info_id is 1, value written to the
battery_info parameter will be treated as SOC (state of charge).

CRs-Fixed: 1035402
Change-Id: Ib9287c5669f1a90322636d194a9f235e63c1db47
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 03662e99
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -250,6 +250,8 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(soc_reporting_ready),
	POWER_SUPPLY_ATTR(ignore_false_negative_isense),
	POWER_SUPPLY_ATTR(enable_jeita_detection),
	POWER_SUPPLY_ATTR(battery_info),
	POWER_SUPPLY_ATTR(battery_info_id),
	/* Local extensions of type int64_t */
	POWER_SUPPLY_ATTR(charge_counter_ext),
	/* Properties of type `const char *' */
+2 −0
Original line number Diff line number Diff line
@@ -213,6 +213,8 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_SOC_REPORTING_READY,
	POWER_SUPPLY_PROP_IGNORE_FALSE_NEGATIVE_ISENSE,
	POWER_SUPPLY_PROP_ENABLE_JEITA_DETECTION,
	POWER_SUPPLY_PROP_BATTERY_INFO,
	POWER_SUPPLY_PROP_BATTERY_INFO_ID,
	/* Local extensions of type int64_t */
	POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
	/* Properties of type `const char *' */