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

Commit deb871fc authored by Ashay Jaiswal's avatar Ashay Jaiswal
Browse files

power_supply: add POWER_SUPPLY properties to be used by charger driver



Add following power_supply properties:
POWER_SUPPLY_PROP_BATFET_MODE: property exposes BATFET configuration
of parallel charger.

POWER_SUPPLY_PROP_MIN_ICL: property exposes minimum ICL configuration
required by parallel charger.

POWER_SUPPLY_PROP_MOISTURE_DETECTED: property exposed moisture detection
state of USB connector.

POWER_SUPPLY_PROP_PARALLEL_FCC_MAX: property exposes upper limit on the
charging current that the parallel charger can supply.


Change-Id: I3a6ed44fbafe0eff4ecc9462bdf9a35f34811d8c
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
parent 17e3ca63
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -361,6 +361,10 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(sdp_current_max),
	POWER_SUPPLY_ATTR(connector_type),
	POWER_SUPPLY_ATTR(battery_type),
	POWER_SUPPLY_ATTR(parallel_batfet_mode),
	POWER_SUPPLY_ATTR(parallel_fcc_max),
	POWER_SUPPLY_ATTR(min_icl),
	POWER_SUPPLY_ATTR(moisture_detected),
	/* Local extensions of type int64_t */
	POWER_SUPPLY_ATTR(charge_counter_ext),
	/* Properties of type `const char *' */
+9 −0
Original line number Diff line number Diff line
@@ -120,6 +120,11 @@ enum {
	POWER_SUPPLY_CONNECTOR_MICRO_USB,
};

enum {
	POWER_SUPPLY_PL_STACKED_BATFET,
	POWER_SUPPLY_PL_NON_STACKED_BATFET,
};

enum power_supply_property {
	/* Properties of type `int' */
	POWER_SUPPLY_PROP_STATUS = 0,
@@ -269,6 +274,10 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_SDP_CURRENT_MAX,
	POWER_SUPPLY_PROP_CONNECTOR_TYPE,
	POWER_SUPPLY_PROP_BATTERY_TYPE,
	POWER_SUPPLY_PROP_PARALLEL_BATFET_MODE,
	POWER_SUPPLY_PROP_PARALLEL_FCC_MAX,
	POWER_SUPPLY_PROP_MIN_ICL,
	POWER_SUPPLY_PROP_MOISTURE_DETECTED,
	/* Local extensions of type int64_t */
	POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
	/* Properties of type `const char *' */