Loading Documentation/devicetree/bindings/power/smb135x-charger.txt +4 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,9 @@ Optional Properties: property should be used with 'qcom,iterm-disabled' to ensure EOC detection in charger is disabled. - qcom,fastchg-ma: Specifies the maximum fastcharge current. The possible range for fastcharge current is from 300mA to 3000mA. Example: i2c@f9967000 { Loading @@ -79,5 +82,6 @@ Example: qcom,recharge-thresh-mv = <100>; regulator-name = "smb1357-otg"; qcom,thermal-mitigation = <1500 700 600 325>; qcom,fastchg-ma = <3000>; }; }; drivers/power/smb135x-charger.c +15 −0 Original line number Diff line number Diff line Loading @@ -336,6 +336,7 @@ struct smb135x_chg { bool inhibit_disabled; int fastchg_current_arr_size; int *fastchg_current_table; int fastchg_ma; u8 irq_cfg_mask[3]; int otg_oc_count; Loading Loading @@ -3450,6 +3451,16 @@ static int smb135x_hw_init(struct smb135x_chg *chip) return rc; } /* set maximum fastchg current */ if (chip->fastchg_ma != -EINVAL) { rc = smb135x_set_fastchg_current(chip, chip->fastchg_ma); if (rc < 0) { dev_err(chip->dev, "Couldn't set fastchg current = %d\n", rc); return rc; } } __smb135x_charging(chip, chip->chg_enabled); /* interrupt enabling - active low */ Loading Loading @@ -3643,6 +3654,10 @@ static int smb_parse_dt(struct smb135x_chg *chip) if (rc) chip->bms_psy_name = NULL; rc = of_property_read_u32(node, "qcom,fastchg-ma", &chip->fastchg_ma); if (rc < 0) chip->fastchg_ma = -EINVAL; chip->soft_vfloat_comp_disabled = of_property_read_bool(node, "qcom,soft-vfloat-comp-disabled"); Loading Loading
Documentation/devicetree/bindings/power/smb135x-charger.txt +4 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,9 @@ Optional Properties: property should be used with 'qcom,iterm-disabled' to ensure EOC detection in charger is disabled. - qcom,fastchg-ma: Specifies the maximum fastcharge current. The possible range for fastcharge current is from 300mA to 3000mA. Example: i2c@f9967000 { Loading @@ -79,5 +82,6 @@ Example: qcom,recharge-thresh-mv = <100>; regulator-name = "smb1357-otg"; qcom,thermal-mitigation = <1500 700 600 325>; qcom,fastchg-ma = <3000>; }; };
drivers/power/smb135x-charger.c +15 −0 Original line number Diff line number Diff line Loading @@ -336,6 +336,7 @@ struct smb135x_chg { bool inhibit_disabled; int fastchg_current_arr_size; int *fastchg_current_table; int fastchg_ma; u8 irq_cfg_mask[3]; int otg_oc_count; Loading Loading @@ -3450,6 +3451,16 @@ static int smb135x_hw_init(struct smb135x_chg *chip) return rc; } /* set maximum fastchg current */ if (chip->fastchg_ma != -EINVAL) { rc = smb135x_set_fastchg_current(chip, chip->fastchg_ma); if (rc < 0) { dev_err(chip->dev, "Couldn't set fastchg current = %d\n", rc); return rc; } } __smb135x_charging(chip, chip->chg_enabled); /* interrupt enabling - active low */ Loading Loading @@ -3643,6 +3654,10 @@ static int smb_parse_dt(struct smb135x_chg *chip) if (rc) chip->bms_psy_name = NULL; rc = of_property_read_u32(node, "qcom,fastchg-ma", &chip->fastchg_ma); if (rc < 0) chip->fastchg_ma = -EINVAL; chip->soft_vfloat_comp_disabled = of_property_read_bool(node, "qcom,soft-vfloat-comp-disabled"); Loading