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

Commit 6a6412ab authored by Umang Agrawal's avatar Umang Agrawal
Browse files

power: battery: Expose FCC stepper work execution status



Add FCC_STEPPER_STATUS property to qcom-battery class to expose
fcc stepper work execution status for thermal balancer user space
daemon.

Change-Id: If85110fa25bfc49277677848b5a7d3c7d3169ecd
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
parent 238086f6
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -123,6 +123,7 @@ enum {
	SLAVE_PCT,
	RESTRICT_CHG_ENABLE,
	RESTRICT_CHG_CURRENT,
	FCC_STEPPING_IN_PROGRESS,
};

/*******
@@ -384,6 +385,18 @@ static ssize_t restrict_cur_store(struct class *c, struct class_attribute *attr,
	return count;
}

/****************************
 * FCC STEPPING IN PROGRESS *
 ****************************/
static ssize_t fcc_stepping_in_progress_show(struct class *c,
			struct class_attribute *attr, char *ubuf)
{
	struct pl_data *chip = container_of(c, struct pl_data,
				qcom_batt_class);

	return snprintf(ubuf, PAGE_SIZE, "%d\n", chip->step_fcc);
}

static struct class_attribute pl_attributes[] = {
	[VER]			= __ATTR_RO(version),
	[SLAVE_PCT]		= __ATTR(parallel_pct, 0644,
@@ -392,6 +405,8 @@ static struct class_attribute pl_attributes[] = {
					restrict_chg_show, restrict_chg_store),
	[RESTRICT_CHG_CURRENT]	= __ATTR(restricted_current, 0644,
					restrict_cur_show, restrict_cur_store),
	[FCC_STEPPING_IN_PROGRESS]
				= __ATTR_RO(fcc_stepping_in_progress),
	__ATTR_NULL,
};