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

Commit b5604a13 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

power: qpnp-smbcharger: separate current setting for hvdcp and hvdcp3



Currently the driver only allows for a single input current setting
for hvdcp and hvdcp 3.0. Create separate module parameters for them
and set the hvdcp current limit to 1.8 Amps.

The underlying reason is hvdcp aren't high in wattage, so it is prudent
to set the input current limit to a lower, more realistic value.

CRs-Fixed: 948903
Change-Id: I26a8b7946291e317fa56738182e4320475cb0dd9
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 22772af9
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -399,12 +399,18 @@ module_param_named(
	int, S_IRUSR | S_IWUSR
);

static int smbchg_default_hvdcp_icl_ma = 3000;
static int smbchg_default_hvdcp_icl_ma = 1800;
module_param_named(
	default_hvdcp_icl_ma, smbchg_default_hvdcp_icl_ma,
	int, S_IRUSR | S_IWUSR
);

static int smbchg_default_hvdcp3_icl_ma = 3000;
module_param_named(
	default_hvdcp3_icl_ma, smbchg_default_hvdcp3_icl_ma,
	int, S_IRUSR | S_IWUSR
);

static int smbchg_default_dcp_icl_ma = 1800;
module_param_named(
	default_dcp_icl_ma, smbchg_default_dcp_icl_ma,
@@ -4181,9 +4187,10 @@ static int smbchg_change_usb_supply_type(struct smbchg_chip *chip,
		current_limit_ma = DEFAULT_SDP_MA;
	else if (type == POWER_SUPPLY_TYPE_USB_CDP)
		current_limit_ma = DEFAULT_CDP_MA;
	else if (type == POWER_SUPPLY_TYPE_USB_HVDCP
			|| type == POWER_SUPPLY_TYPE_USB_HVDCP_3)
	else if (type == POWER_SUPPLY_TYPE_USB_HVDCP)
		current_limit_ma = smbchg_default_hvdcp_icl_ma;
	else if (type == POWER_SUPPLY_TYPE_USB_HVDCP_3)
		current_limit_ma = smbchg_default_hvdcp3_icl_ma;
	else
		current_limit_ma = smbchg_default_dcp_icl_ma;