Loading Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb5.txt +7 −0 Original line number Diff line number Diff line Loading @@ -350,6 +350,13 @@ Charger specific properties: Value type: bool Definition: Boolean flag which when present disables FCC restriction. - qcom,wls-current-max-ua Usage: optional Value type: <u32> Definition: Upper limit of charging current supplied by the wireless charger. If left unspecified, the HW min value of 1.5 A is applied by default. ============================================= Second Level Nodes - SMB5 Charger Peripherals ============================================= Loading drivers/power/supply/qcom/qpnp-smb5.c +7 −1 Original line number Diff line number Diff line Loading @@ -397,7 +397,7 @@ static int smb5_parse_dt(struct smb5 *chip) { struct smb_charger *chg = &chip->chg; struct device_node *node = chg->dev->of_node; int rc, byte_len; int rc, byte_len, tmp; if (!node) { pr_err("device tree node missing\n"); Loading Loading @@ -654,6 +654,12 @@ static int smb5_parse_dt(struct smb5 *chip) if (chg->chg_param.hvdcp3_max_icl_ua <= 0) chg->chg_param.hvdcp3_max_icl_ua = MICRO_3PA; chg->wls_icl_ua = DCIN_ICL_MAX_UA; rc = of_property_read_u32(node, "qcom,wls-current-max-ua", &tmp); if (!rc && tmp < DCIN_ICL_MAX_UA) chg->wls_icl_ua = tmp; return 0; } Loading drivers/power/supply/qcom/smb5-lib.c +2 −3 Original line number Diff line number Diff line Loading @@ -5995,14 +5995,13 @@ static void dcin_aicl(struct smb_charger *chg) if (rc < 0) goto unlock; if (icl == DCIN_ICL_MAX_UA) { if (icl == chg->wls_icl_ua) { /* Upper limit reached; do nothing */ smblib_dbg(chg, PR_WLS, "hit max ICL: stop\n"); goto unlock; } icl += DCIN_ICL_STEP_UA; icl = min(chg->wls_icl_ua, icl + DCIN_ICL_STEP_UA); icl_save = icl; rc = smblib_set_charge_param(chg, &chg->param.dc_icl, icl); Loading drivers/power/supply/qcom/smb5-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -563,6 +563,7 @@ struct smb_charger { int init_thermal_ua; u32 comp_clamp_level; bool hvdcp3_standalone_config; int wls_icl_ua; /* workaround flag */ u32 wa_flags; Loading Loading
Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb5.txt +7 −0 Original line number Diff line number Diff line Loading @@ -350,6 +350,13 @@ Charger specific properties: Value type: bool Definition: Boolean flag which when present disables FCC restriction. - qcom,wls-current-max-ua Usage: optional Value type: <u32> Definition: Upper limit of charging current supplied by the wireless charger. If left unspecified, the HW min value of 1.5 A is applied by default. ============================================= Second Level Nodes - SMB5 Charger Peripherals ============================================= Loading
drivers/power/supply/qcom/qpnp-smb5.c +7 −1 Original line number Diff line number Diff line Loading @@ -397,7 +397,7 @@ static int smb5_parse_dt(struct smb5 *chip) { struct smb_charger *chg = &chip->chg; struct device_node *node = chg->dev->of_node; int rc, byte_len; int rc, byte_len, tmp; if (!node) { pr_err("device tree node missing\n"); Loading Loading @@ -654,6 +654,12 @@ static int smb5_parse_dt(struct smb5 *chip) if (chg->chg_param.hvdcp3_max_icl_ua <= 0) chg->chg_param.hvdcp3_max_icl_ua = MICRO_3PA; chg->wls_icl_ua = DCIN_ICL_MAX_UA; rc = of_property_read_u32(node, "qcom,wls-current-max-ua", &tmp); if (!rc && tmp < DCIN_ICL_MAX_UA) chg->wls_icl_ua = tmp; return 0; } Loading
drivers/power/supply/qcom/smb5-lib.c +2 −3 Original line number Diff line number Diff line Loading @@ -5995,14 +5995,13 @@ static void dcin_aicl(struct smb_charger *chg) if (rc < 0) goto unlock; if (icl == DCIN_ICL_MAX_UA) { if (icl == chg->wls_icl_ua) { /* Upper limit reached; do nothing */ smblib_dbg(chg, PR_WLS, "hit max ICL: stop\n"); goto unlock; } icl += DCIN_ICL_STEP_UA; icl = min(chg->wls_icl_ua, icl + DCIN_ICL_STEP_UA); icl_save = icl; rc = smblib_set_charge_param(chg, &chg->param.dc_icl, icl); Loading
drivers/power/supply/qcom/smb5-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -563,6 +563,7 @@ struct smb_charger { int init_thermal_ua; u32 comp_clamp_level; bool hvdcp3_standalone_config; int wls_icl_ua; /* workaround flag */ u32 wa_flags; Loading