Loading Documentation/devicetree/bindings/power/smb1360-charger-fg.txt +3 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,9 @@ Optional Properties: - qcom,fg-voltage-empty-mv The voltage which indicates the battery is empty. - qcom,thermal-mitigation: Array of input current limit values for different system thermal mitigation level. - qcom,stat-pulsed-irq: A boolean flag to indicate the state-irq pin will generate pulse signal when interrupt happened. If this property is not specified, the default configuration is static level irq. Example: i2c@f9967000 { Loading drivers/power/smb1360-charger-fg.c +7 −1 Original line number Diff line number Diff line Loading @@ -214,6 +214,7 @@ struct smb1360_chip { u8 revision; unsigned short default_i2c_addr; unsigned short fg_i2c_addr; bool pulsed_irq; /* configuration data - charger */ int fake_battery_soc; Loading Loading @@ -2223,7 +2224,10 @@ static int smb1360_hw_init(struct smb1360_chip *chip) if (chip->client->irq) { mask = CHG_STAT_IRQ_ONLY_BIT | CHG_STAT_ACTIVE_HIGH_BIT | CHG_STAT_DISABLE_BIT; if (!chip->pulsed_irq) reg = CHG_STAT_IRQ_ONLY_BIT; else reg = 0; rc = smb1360_masked_write(chip, CFG_STAT_CTRL_REG, mask, reg); if (rc < 0) { dev_err(chip->dev, "Couldn't set irq config rc = %d\n", Loading Loading @@ -2304,6 +2308,8 @@ static int smb_parse_dt(struct smb1360_chip *chip) return -EINVAL; } chip->pulsed_irq = of_property_read_bool(node, "qcom,stat-pulsed-irq"); rc = of_property_read_u32(node, "qcom,float-voltage-mv", &chip->vfloat_mv); if (rc < 0) Loading Loading
Documentation/devicetree/bindings/power/smb1360-charger-fg.txt +3 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,9 @@ Optional Properties: - qcom,fg-voltage-empty-mv The voltage which indicates the battery is empty. - qcom,thermal-mitigation: Array of input current limit values for different system thermal mitigation level. - qcom,stat-pulsed-irq: A boolean flag to indicate the state-irq pin will generate pulse signal when interrupt happened. If this property is not specified, the default configuration is static level irq. Example: i2c@f9967000 { Loading
drivers/power/smb1360-charger-fg.c +7 −1 Original line number Diff line number Diff line Loading @@ -214,6 +214,7 @@ struct smb1360_chip { u8 revision; unsigned short default_i2c_addr; unsigned short fg_i2c_addr; bool pulsed_irq; /* configuration data - charger */ int fake_battery_soc; Loading Loading @@ -2223,7 +2224,10 @@ static int smb1360_hw_init(struct smb1360_chip *chip) if (chip->client->irq) { mask = CHG_STAT_IRQ_ONLY_BIT | CHG_STAT_ACTIVE_HIGH_BIT | CHG_STAT_DISABLE_BIT; if (!chip->pulsed_irq) reg = CHG_STAT_IRQ_ONLY_BIT; else reg = 0; rc = smb1360_masked_write(chip, CFG_STAT_CTRL_REG, mask, reg); if (rc < 0) { dev_err(chip->dev, "Couldn't set irq config rc = %d\n", Loading Loading @@ -2304,6 +2308,8 @@ static int smb_parse_dt(struct smb1360_chip *chip) return -EINVAL; } chip->pulsed_irq = of_property_read_bool(node, "qcom,stat-pulsed-irq"); rc = of_property_read_u32(node, "qcom,float-voltage-mv", &chip->vfloat_mv); if (rc < 0) Loading