Loading Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb2.txt +6 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,12 @@ Charger specific properties: to be get from these properties defined in battery profile: qcom,step-chg-ranges, qcom,jeita-fcc-ranges, qcom,jeita-fv-ranges. - qcom,disable-stat-sw-override Usage: optional Value type: bool Definition: Boolean flag which when present disables STAT pin default software override configuration. ============================================= Second Level Nodes - SMB2 Charger Peripherals ============================================= Loading drivers/power/supply/qcom/qpnp-smb2.c +13 −0 Original line number Diff line number Diff line Loading @@ -331,6 +331,9 @@ static int smb2_parse_dt(struct smb2 *chip) if (rc < 0) chg->otg_delay_ms = OTG_DEFAULT_DEGLITCH_TIME_MS; chg->disable_stat_sw_override = of_property_read_bool(node, "qcom,disable-stat-sw-override"); return 0; } Loading Loading @@ -1837,6 +1840,16 @@ static int smb2_init_hw(struct smb2 *chip) } } if (chg->disable_stat_sw_override) { rc = smblib_masked_write(chg, STAT_CFG_REG, STAT_SW_OVERRIDE_CFG_BIT, 0); if (rc < 0) { dev_err(chg->dev, "Couldn't disable STAT SW override rc=%d\n", rc); return rc; } } return rc; } Loading drivers/power/supply/qcom/smb-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -353,6 +353,7 @@ struct smb_charger { bool use_extcon; bool otg_present; bool is_audio_adapter; bool disable_stat_sw_override; /* workaround flag */ u32 wa_flags; Loading Loading
Documentation/devicetree/bindings/power/supply/qcom/qpnp-smb2.txt +6 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,12 @@ Charger specific properties: to be get from these properties defined in battery profile: qcom,step-chg-ranges, qcom,jeita-fcc-ranges, qcom,jeita-fv-ranges. - qcom,disable-stat-sw-override Usage: optional Value type: bool Definition: Boolean flag which when present disables STAT pin default software override configuration. ============================================= Second Level Nodes - SMB2 Charger Peripherals ============================================= Loading
drivers/power/supply/qcom/qpnp-smb2.c +13 −0 Original line number Diff line number Diff line Loading @@ -331,6 +331,9 @@ static int smb2_parse_dt(struct smb2 *chip) if (rc < 0) chg->otg_delay_ms = OTG_DEFAULT_DEGLITCH_TIME_MS; chg->disable_stat_sw_override = of_property_read_bool(node, "qcom,disable-stat-sw-override"); return 0; } Loading Loading @@ -1837,6 +1840,16 @@ static int smb2_init_hw(struct smb2 *chip) } } if (chg->disable_stat_sw_override) { rc = smblib_masked_write(chg, STAT_CFG_REG, STAT_SW_OVERRIDE_CFG_BIT, 0); if (rc < 0) { dev_err(chg->dev, "Couldn't disable STAT SW override rc=%d\n", rc); return rc; } } return rc; } Loading
drivers/power/supply/qcom/smb-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -353,6 +353,7 @@ struct smb_charger { bool use_extcon; bool otg_present; bool is_audio_adapter; bool disable_stat_sw_override; /* workaround flag */ u32 wa_flags; Loading