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

Commit e90672c3 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_CHARGE_DISABLE



Partially taken from commit 7c4bd0cdf4eff0dd6774183435fc8139743cd6e4
("power_supply: support for CHARGE_DISABLE")
Change-Id: Icd7574696ada4ea5c7d8811787461bc04c922b3c

Signed-off-by: default avatarAleX Pelosi <apelosi@google.com>
Signed-off-by: default avatarJack Wu <wjack@google.com>
Bug: 139264914
Bug: 141347448
(cherry picked from commit 7c4bd0cdf4eff0dd6774183435fc8139743cd6e4)
Signed-off-by: default avatarMark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I178c16fe01fb262e7d9cca777c49e8ad586e8eba
parent 554dd9d9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -464,6 +464,7 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(comp_clamp_level),
	POWER_SUPPLY_ATTR(adapter_cc_mode),
	POWER_SUPPLY_ATTR(skin_health),
	POWER_SUPPLY_ATTR(charge_disable),
	/* Charge pump properties */
	POWER_SUPPLY_ATTR(cp_status1),
	POWER_SUPPLY_ATTR(cp_status2),
@@ -577,6 +578,12 @@ int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env)

		attr = &power_supply_attrs[psy->desc->properties[j]];

		if (!attr->attr.name) {
			dev_info(dev, "%s:%d FAKE attr.name=NULL skip\n",
				__FILE__, __LINE__, __func__);
			continue;
		}

		ret = power_supply_show_property(dev, attr, prop_buf);
		if (ret == -ENODEV || ret == -ENODATA) {
			/* When a battery is absent, we expect -ENODEV. Don't abort;
+1 −0
Original line number Diff line number Diff line
@@ -335,6 +335,7 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_COMP_CLAMP_LEVEL,
	POWER_SUPPLY_PROP_ADAPTER_CC_MODE,
	POWER_SUPPLY_PROP_SKIN_HEALTH,
	POWER_SUPPLY_PROP_CHARGE_DISABLE,
	/* Charge pump properties */
	POWER_SUPPLY_PROP_CP_STATUS1,
	POWER_SUPPLY_PROP_CP_STATUS2,