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

Commit cf749f20 authored by Umang Agrawal's avatar Umang Agrawal Committed by Guru Das Srinagesh
Browse files

power_supply: Add power supply type "Charge Pump"



Introduce a new power supply type "Charge Pump" under the power_supply
class. Also, add power supply properties corresponding to power supply
type charge pump.

Change-Id: Ic2ae389601afba37a882d18d5fbb986f86fd3067
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent fa76128b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ static const char * const power_supply_type_text[] = {
	"USB_PD", "USB_PD_DRP", "BrickID",
	"USB_HVDCP", "USB_HVDCP_3", "Wireless", "USB_FLOAT",
	"BMS", "Parallel", "Main", "Wipower", "USB_C_UFP", "USB_C_DFP",
	"Charge_Pump",
};

static const char * const power_supply_usb_type_text[] = {
@@ -445,6 +446,16 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(fcc_stepper_enable),
	POWER_SUPPLY_ATTR(toggle_stat),
	POWER_SUPPLY_ATTR(main_fcc_max),
	/* Charge pump properties */
	POWER_SUPPLY_ATTR(cp_status1),
	POWER_SUPPLY_ATTR(cp_status2),
	POWER_SUPPLY_ATTR(cp_enable),
	POWER_SUPPLY_ATTR(cp_switcher_en),
	POWER_SUPPLY_ATTR(cp_die_temp),
	POWER_SUPPLY_ATTR(cp_isns),
	POWER_SUPPLY_ATTR(cp_toggle_switcher),
	POWER_SUPPLY_ATTR(cp_irq_status),
	POWER_SUPPLY_ATTR(cp_ilim),
	/* Local extensions of type int64_t */
	POWER_SUPPLY_ATTR(charge_counter_ext),
	/* Properties of type `const char *' */
+11 −0
Original line number Diff line number Diff line
@@ -313,6 +313,16 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_FCC_STEPPER_ENABLE,
	POWER_SUPPLY_PROP_TOGGLE_STAT,
	POWER_SUPPLY_PROP_MAIN_FCC_MAX,
	/* Charge pump properties */
	POWER_SUPPLY_PROP_CP_STATUS1,
	POWER_SUPPLY_PROP_CP_STATUS2,
	POWER_SUPPLY_PROP_CP_ENABLE,
	POWER_SUPPLY_PROP_CP_SWITCHER_EN,
	POWER_SUPPLY_PROP_CP_DIE_TEMP,
	POWER_SUPPLY_PROP_CP_ISNS,
	POWER_SUPPLY_PROP_CP_TOGGLE_SWITCHER,
	POWER_SUPPLY_PROP_CP_IRQ_STATUS,
	POWER_SUPPLY_PROP_CP_ILIM,
	/* Local extensions of type int64_t */
	POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
	/* Properties of type `const char *' */
@@ -346,6 +356,7 @@ enum power_supply_type {
	POWER_SUPPLY_TYPE_WIPOWER,		/* Wipower */
	POWER_SUPPLY_TYPE_UFP,			/* Type-C UFP */
	POWER_SUPPLY_TYPE_DFP,			/* Type-C DFP */
	POWER_SUPPLY_TYPE_CHARGE_PUMP,		/* Charge Pump */
};

enum power_supply_usb_type {