Loading Documentation/devicetree/bindings/power/smb1360-charger-fg.txt +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,8 @@ Optional Properties: - qcom,shdn-after-pwroff: A bool property to configure smb1360 for shutdown at power-off. - qcom,empty-soc-disabled: A bool property to indicate whether stop updating empty_soc flag. System reports 0% SOC when empty_soc being set. - qcom,awake-min-soc A bool property to indicate whether the system is prevented from sleeping when SOC is under the min_soc threshold. - qcom,batt-profile-select A boolean flag to indicate of battery-profile selection is enabled. - qcom,profile-a-rid-kohm The battery-ID resistor (RID) in Kohm supported by Loading drivers/power/smb1360-charger-fg.c +8 −1 Original line number Diff line number Diff line Loading @@ -337,6 +337,7 @@ struct smb1360_chip { bool resume_completed; bool irq_waiting; bool empty_soc; bool awake_min_soc; int workaround_flags; u8 irq_cfg_mask[3]; int usb_psy_ma; Loading Loading @@ -1634,7 +1635,10 @@ static int delta_soc_handler(struct smb1360_chip *chip, u8 rt_stat) static int min_soc_handler(struct smb1360_chip *chip, u8 rt_stat) { pr_debug("SOC dropped below min SOC\n"); pr_debug("SOC dropped below min SOC, rt_stat = 0x%02x\n", rt_stat); if (chip->awake_min_soc) rt_stat ? pm_stay_awake(chip->dev) : pm_relax(chip->dev); return 0; } Loading Loading @@ -3711,6 +3715,9 @@ static int smb_parse_dt(struct smb1360_chip *chip) if (rc < 0) chip->soc_min = -EINVAL; chip->awake_min_soc = of_property_read_bool(node, "qcom,awake-min-soc"); rc = of_property_read_u32(node, "qcom,fg-voltage-min-mv", &chip->voltage_min_mv); if (rc < 0) Loading Loading
Documentation/devicetree/bindings/power/smb1360-charger-fg.txt +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,8 @@ Optional Properties: - qcom,shdn-after-pwroff: A bool property to configure smb1360 for shutdown at power-off. - qcom,empty-soc-disabled: A bool property to indicate whether stop updating empty_soc flag. System reports 0% SOC when empty_soc being set. - qcom,awake-min-soc A bool property to indicate whether the system is prevented from sleeping when SOC is under the min_soc threshold. - qcom,batt-profile-select A boolean flag to indicate of battery-profile selection is enabled. - qcom,profile-a-rid-kohm The battery-ID resistor (RID) in Kohm supported by Loading
drivers/power/smb1360-charger-fg.c +8 −1 Original line number Diff line number Diff line Loading @@ -337,6 +337,7 @@ struct smb1360_chip { bool resume_completed; bool irq_waiting; bool empty_soc; bool awake_min_soc; int workaround_flags; u8 irq_cfg_mask[3]; int usb_psy_ma; Loading Loading @@ -1634,7 +1635,10 @@ static int delta_soc_handler(struct smb1360_chip *chip, u8 rt_stat) static int min_soc_handler(struct smb1360_chip *chip, u8 rt_stat) { pr_debug("SOC dropped below min SOC\n"); pr_debug("SOC dropped below min SOC, rt_stat = 0x%02x\n", rt_stat); if (chip->awake_min_soc) rt_stat ? pm_stay_awake(chip->dev) : pm_relax(chip->dev); return 0; } Loading Loading @@ -3711,6 +3715,9 @@ static int smb_parse_dt(struct smb1360_chip *chip) if (rc < 0) chip->soc_min = -EINVAL; chip->awake_min_soc = of_property_read_bool(node, "qcom,awake-min-soc"); rc = of_property_read_u32(node, "qcom,fg-voltage-min-mv", &chip->voltage_min_mv); if (rc < 0) Loading