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

Commit 20534950 authored by Ashay Jaiswal's avatar Ashay Jaiswal Committed by Umang Agrawal
Browse files

power_supply: add property to disable QC userspace optimizations



Add power_supply property to configure quick-charge(QC) userspace
optimization mode(hardware/software controlled), user-space daemon
will read the property and disable quick-charge optimization algorithms.

Change-Id: I3100e129ceeeeb8c83ba4b6fcf761b59a5a4ab75
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
parent 50d1e289
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -388,6 +388,7 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(toggle_stat),
	POWER_SUPPLY_ATTR(toggle_stat),
	POWER_SUPPLY_ATTR(main_fcc_max),
	POWER_SUPPLY_ATTR(main_fcc_max),
	POWER_SUPPLY_ATTR(fg_reset),
	POWER_SUPPLY_ATTR(fg_reset),
	POWER_SUPPLY_ATTR(qc_opti_disable),
	/* Charge pump properties */
	/* Charge pump properties */
	POWER_SUPPLY_ATTR(cp_status1),
	POWER_SUPPLY_ATTR(cp_status1),
	POWER_SUPPLY_ATTR(cp_status2),
	POWER_SUPPLY_ATTR(cp_status2),
+7 −0
Original line number Original line Diff line number Diff line
@@ -145,6 +145,12 @@ enum {
	POWER_SUPPLY_PD_PPS_ACTIVE,
	POWER_SUPPLY_PD_PPS_ACTIVE,
};
};


enum {
	POWER_SUPPLY_QC_CTM_DISABLE = BIT(0),
	POWER_SUPPLY_QC_THERMAL_BALANCE_DISABLE = BIT(1),
	POWER_SUPPLY_QC_INOV_THERMAL_DISABLE = BIT(2),
};

enum power_supply_property {
enum power_supply_property {
	/* Properties of type `int' */
	/* Properties of type `int' */
	POWER_SUPPLY_PROP_STATUS = 0,
	POWER_SUPPLY_PROP_STATUS = 0,
@@ -313,6 +319,7 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_TOGGLE_STAT,
	POWER_SUPPLY_PROP_TOGGLE_STAT,
	POWER_SUPPLY_PROP_MAIN_FCC_MAX,
	POWER_SUPPLY_PROP_MAIN_FCC_MAX,
	POWER_SUPPLY_PROP_FG_RESET,
	POWER_SUPPLY_PROP_FG_RESET,
	POWER_SUPPLY_PROP_QC_OPTI_DISABLE,
	/* Charge pump properties */
	/* Charge pump properties */
	POWER_SUPPLY_PROP_CP_STATUS1,
	POWER_SUPPLY_PROP_CP_STATUS1,
	POWER_SUPPLY_PROP_CP_STATUS2,
	POWER_SUPPLY_PROP_CP_STATUS2,