Loading Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb5.txt +5 −0 Original line number Diff line number Diff line Loading @@ -345,6 +345,11 @@ Charger specific properties: Definition: Boolean flag which when present disables the software thermal regulation. - qcom,disable-fcc-restriction Usage: optional Value type: bool Definition: Boolean flag which when present disables FCC restriction. ============================================= Second Level Nodes - SMB5 Charger Peripherals ============================================= Loading arch/arm64/boot/dts/qcom/atoll-atp.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -262,6 +262,7 @@ qcom,charger-temp-max = <800>; qcom,smb-temp-max = <800>; qcom,disable-sw-thermal-regulation; qcom,disable-fcc-restriction; }; &pm6150l_gpios { Loading arch/arm64/boot/dts/qcom/atoll-idp.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ qcom,charger-temp-max = <800>; qcom,smb-temp-max = <800>; qcom,disable-sw-thermal-regulation; qcom,disable-fcc-restriction; }; &pm6150l_gpios { Loading arch/arm64/boot/dts/qcom/atoll-qrd.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ qcom,charger-temp-max = <800>; qcom,smb-temp-max = <800>; qcom,disable-sw-thermal-regulation; qcom,disable-fcc-restriction; }; &usb0 { Loading drivers/power/supply/qcom/qpnp-smb5.c +6 −5 Original line number Diff line number Diff line Loading @@ -266,11 +266,10 @@ static int smb5_chg_config_init(struct smb5 *chip) { struct smb_charger *chg = &chip->chg; struct pmic_revid_data *pmic_rev_id; struct device_node *revid_dev_node; struct device_node *revid_dev_node, *node = chg->dev->of_node; int rc = 0; revid_dev_node = of_parse_phandle(chip->chg.dev->of_node, "qcom,pmic-revid", 0); revid_dev_node = of_parse_phandle(node, "qcom,pmic-revid", 0); if (!revid_dev_node) { pr_err("Missing qcom,pmic-revid property\n"); return -EINVAL; Loading Loading @@ -334,10 +333,12 @@ static int smb5_chg_config_init(struct smb5 *chip) chg->chg_freq.freq_below_otg_threshold = 800; chg->chg_freq.freq_above_otg_threshold = 800; if (of_property_read_bool(chip->chg.dev->of_node, "qcom,disable-sw-thermal-regulation")) if (of_property_read_bool(node, "qcom,disable-sw-thermal-regulation")) chg->wa_flags &= ~SW_THERM_REGULATION_WA; if (of_property_read_bool(node, "qcom,disable-fcc-restriction")) chg->main_fcc_max = -EINVAL; out: of_node_put(revid_dev_node); return rc; Loading Loading
Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb5.txt +5 −0 Original line number Diff line number Diff line Loading @@ -345,6 +345,11 @@ Charger specific properties: Definition: Boolean flag which when present disables the software thermal regulation. - qcom,disable-fcc-restriction Usage: optional Value type: bool Definition: Boolean flag which when present disables FCC restriction. ============================================= Second Level Nodes - SMB5 Charger Peripherals ============================================= Loading
arch/arm64/boot/dts/qcom/atoll-atp.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -262,6 +262,7 @@ qcom,charger-temp-max = <800>; qcom,smb-temp-max = <800>; qcom,disable-sw-thermal-regulation; qcom,disable-fcc-restriction; }; &pm6150l_gpios { Loading
arch/arm64/boot/dts/qcom/atoll-idp.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ qcom,charger-temp-max = <800>; qcom,smb-temp-max = <800>; qcom,disable-sw-thermal-regulation; qcom,disable-fcc-restriction; }; &pm6150l_gpios { Loading
arch/arm64/boot/dts/qcom/atoll-qrd.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ qcom,charger-temp-max = <800>; qcom,smb-temp-max = <800>; qcom,disable-sw-thermal-regulation; qcom,disable-fcc-restriction; }; &usb0 { Loading
drivers/power/supply/qcom/qpnp-smb5.c +6 −5 Original line number Diff line number Diff line Loading @@ -266,11 +266,10 @@ static int smb5_chg_config_init(struct smb5 *chip) { struct smb_charger *chg = &chip->chg; struct pmic_revid_data *pmic_rev_id; struct device_node *revid_dev_node; struct device_node *revid_dev_node, *node = chg->dev->of_node; int rc = 0; revid_dev_node = of_parse_phandle(chip->chg.dev->of_node, "qcom,pmic-revid", 0); revid_dev_node = of_parse_phandle(node, "qcom,pmic-revid", 0); if (!revid_dev_node) { pr_err("Missing qcom,pmic-revid property\n"); return -EINVAL; Loading Loading @@ -334,10 +333,12 @@ static int smb5_chg_config_init(struct smb5 *chip) chg->chg_freq.freq_below_otg_threshold = 800; chg->chg_freq.freq_above_otg_threshold = 800; if (of_property_read_bool(chip->chg.dev->of_node, "qcom,disable-sw-thermal-regulation")) if (of_property_read_bool(node, "qcom,disable-sw-thermal-regulation")) chg->wa_flags &= ~SW_THERM_REGULATION_WA; if (of_property_read_bool(node, "qcom,disable-fcc-restriction")) chg->main_fcc_max = -EINVAL; out: of_node_put(revid_dev_node); return rc; Loading