Loading Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb5.txt +6 −0 Original line number Diff line number Diff line Loading @@ -201,6 +201,12 @@ Charger specific properties: Value type: bool Definition: Boolean flag which when present enables step-charging. - qcom,typec-legacy-rp-icl Usage: optional Value type: bool Definition: Boolean property to enable setting ICL based on Rp for Type-C non-compliant legacy cables. - qcom,wd-bark-time-secs Usage: optional Value type: <u32> Loading drivers/power/supply/qcom/qpnp-smb5.c +3 −0 Original line number Diff line number Diff line Loading @@ -324,6 +324,9 @@ static int smb5_parse_dt(struct smb5 *chip) chg->step_chg_enabled = of_property_read_bool(node, "qcom,step-charging-enable"); chg->typec_legacy_use_rp_icl = of_property_read_bool(node, "qcom,typec-legacy-rp-icl"); chg->sw_jeita_enabled = of_property_read_bool(node, "qcom,sw-jeita-enable"); Loading drivers/power/supply/qcom/smb5-lib.c +2 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ #define typec_rp_med_high(chg, typec_mode) \ ((typec_mode == POWER_SUPPLY_TYPEC_SOURCE_MEDIUM \ || typec_mode == POWER_SUPPLY_TYPEC_SOURCE_HIGH) \ && !chg->typec_legacy) && (!chg->typec_legacy || chg->typec_legacy_use_rp_icl)) static void update_sw_icl_max(struct smb_charger *chg, int pst); Loading Loading @@ -3955,7 +3955,7 @@ int smblib_get_charge_current(struct smb_charger *chg, return 0; } if (non_compliant) { if (non_compliant && !chg->typec_legacy_use_rp_icl) { switch (apsd_result->bit) { case CDP_CHARGER_BIT: current_ua = CDP_CURRENT_UA; Loading drivers/power/supply/qcom/smb5-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,7 @@ struct smb_charger { int fake_batt_status; bool step_chg_enabled; bool sw_jeita_enabled; bool typec_legacy_use_rp_icl; bool is_hdc; bool chg_done; int connector_type; Loading Loading
Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb5.txt +6 −0 Original line number Diff line number Diff line Loading @@ -201,6 +201,12 @@ Charger specific properties: Value type: bool Definition: Boolean flag which when present enables step-charging. - qcom,typec-legacy-rp-icl Usage: optional Value type: bool Definition: Boolean property to enable setting ICL based on Rp for Type-C non-compliant legacy cables. - qcom,wd-bark-time-secs Usage: optional Value type: <u32> Loading
drivers/power/supply/qcom/qpnp-smb5.c +3 −0 Original line number Diff line number Diff line Loading @@ -324,6 +324,9 @@ static int smb5_parse_dt(struct smb5 *chip) chg->step_chg_enabled = of_property_read_bool(node, "qcom,step-charging-enable"); chg->typec_legacy_use_rp_icl = of_property_read_bool(node, "qcom,typec-legacy-rp-icl"); chg->sw_jeita_enabled = of_property_read_bool(node, "qcom,sw-jeita-enable"); Loading
drivers/power/supply/qcom/smb5-lib.c +2 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ #define typec_rp_med_high(chg, typec_mode) \ ((typec_mode == POWER_SUPPLY_TYPEC_SOURCE_MEDIUM \ || typec_mode == POWER_SUPPLY_TYPEC_SOURCE_HIGH) \ && !chg->typec_legacy) && (!chg->typec_legacy || chg->typec_legacy_use_rp_icl)) static void update_sw_icl_max(struct smb_charger *chg, int pst); Loading Loading @@ -3955,7 +3955,7 @@ int smblib_get_charge_current(struct smb_charger *chg, return 0; } if (non_compliant) { if (non_compliant && !chg->typec_legacy_use_rp_icl) { switch (apsd_result->bit) { case CDP_CHARGER_BIT: current_ua = CDP_CURRENT_UA; Loading
drivers/power/supply/qcom/smb5-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,7 @@ struct smb_charger { int fake_batt_status; bool step_chg_enabled; bool sw_jeita_enabled; bool typec_legacy_use_rp_icl; bool is_hdc; bool chg_done; int connector_type; Loading