Loading Documentation/devicetree/bindings/power/smb349-charger.txt +0 −3 Original line number Diff line number Diff line Loading @@ -21,9 +21,6 @@ Optional Properties: - qcom,chg-autonomous-mode This is a bool property and it indicates that the charger is configured for autonomous operation and does not require any software configuration. - qcom,enable-chg-type-detection This is bool property and it indicates if charger detection is supported by this driver. - qcom,disable-apsd This is a bool property which disables Automatic power source detection (apsd). If this is set charger detection is done by DCIN UV irq. Loading drivers/power/smb349-charger.c +4 −11 Original line number Diff line number Diff line Loading @@ -161,7 +161,6 @@ struct smb349_charger { int chg_present; bool chg_autonomous_mode; bool disable_apsd; bool enable_chg_type_detection; bool battery_missing; bool supply_update; const char *bms_psy_name; Loading Loading @@ -915,11 +914,7 @@ static int apsd_complete(struct smb349_charger *chip, u8 status) dev_dbg(chip->dev, "APSD complete. USB type detected=%d chg_present=%d", type, chip->chg_present); if (chip->enable_chg_type_detection) { dev_dbg(chip->dev, "%s updating usb_psy with type=%d", __func__, type); power_supply_set_supply_type(chip->usb_psy, type); } /* SMB is now done sampling the D+/D- lines, indicate USB driver */ dev_dbg(chip->dev, "%s updating usb_psy present=%d", __func__, Loading @@ -936,6 +931,8 @@ static int chg_uv(struct smb349_charger *chip, u8 status) chip->chg_present = true; dev_dbg(chip->dev, "%s updating usb_psy present=%d", __func__, chip->chg_present); power_supply_set_supply_type(chip->usb_psy, POWER_SUPPLY_TYPE_USB); power_supply_set_present(chip->usb_psy, chip->chg_present); } Loading @@ -943,7 +940,6 @@ static int chg_uv(struct smb349_charger *chip, u8 status) chip->chg_present = false; dev_dbg(chip->dev, "%s updating usb_psy present=%d", __func__, chip->chg_present); if (chip->enable_chg_type_detection) power_supply_set_supply_type(chip->usb_psy, POWER_SUPPLY_TYPE_UNKNOWN); power_supply_set_present(chip->usb_psy, chip->chg_present); Loading Loading @@ -1137,9 +1133,6 @@ static int smb_parse_dt(struct smb349_charger *chip) chip->chg_autonomous_mode = of_property_read_bool(node, "qcom,chg-autonomous-mode"); chip->enable_chg_type_detection = of_property_read_bool(node, "qcom,enable-chg-type-detection"); chip->disable_apsd = of_property_read_bool(node, "qcom,disable-apsd"); rc = of_property_read_string(node, "qcom,bms-psy-name", Loading Loading
Documentation/devicetree/bindings/power/smb349-charger.txt +0 −3 Original line number Diff line number Diff line Loading @@ -21,9 +21,6 @@ Optional Properties: - qcom,chg-autonomous-mode This is a bool property and it indicates that the charger is configured for autonomous operation and does not require any software configuration. - qcom,enable-chg-type-detection This is bool property and it indicates if charger detection is supported by this driver. - qcom,disable-apsd This is a bool property which disables Automatic power source detection (apsd). If this is set charger detection is done by DCIN UV irq. Loading
drivers/power/smb349-charger.c +4 −11 Original line number Diff line number Diff line Loading @@ -161,7 +161,6 @@ struct smb349_charger { int chg_present; bool chg_autonomous_mode; bool disable_apsd; bool enable_chg_type_detection; bool battery_missing; bool supply_update; const char *bms_psy_name; Loading Loading @@ -915,11 +914,7 @@ static int apsd_complete(struct smb349_charger *chip, u8 status) dev_dbg(chip->dev, "APSD complete. USB type detected=%d chg_present=%d", type, chip->chg_present); if (chip->enable_chg_type_detection) { dev_dbg(chip->dev, "%s updating usb_psy with type=%d", __func__, type); power_supply_set_supply_type(chip->usb_psy, type); } /* SMB is now done sampling the D+/D- lines, indicate USB driver */ dev_dbg(chip->dev, "%s updating usb_psy present=%d", __func__, Loading @@ -936,6 +931,8 @@ static int chg_uv(struct smb349_charger *chip, u8 status) chip->chg_present = true; dev_dbg(chip->dev, "%s updating usb_psy present=%d", __func__, chip->chg_present); power_supply_set_supply_type(chip->usb_psy, POWER_SUPPLY_TYPE_USB); power_supply_set_present(chip->usb_psy, chip->chg_present); } Loading @@ -943,7 +940,6 @@ static int chg_uv(struct smb349_charger *chip, u8 status) chip->chg_present = false; dev_dbg(chip->dev, "%s updating usb_psy present=%d", __func__, chip->chg_present); if (chip->enable_chg_type_detection) power_supply_set_supply_type(chip->usb_psy, POWER_SUPPLY_TYPE_UNKNOWN); power_supply_set_present(chip->usb_psy, chip->chg_present); Loading Loading @@ -1137,9 +1133,6 @@ static int smb_parse_dt(struct smb349_charger *chip) chip->chg_autonomous_mode = of_property_read_bool(node, "qcom,chg-autonomous-mode"); chip->enable_chg_type_detection = of_property_read_bool(node, "qcom,enable-chg-type-detection"); chip->disable_apsd = of_property_read_bool(node, "qcom,disable-apsd"); rc = of_property_read_string(node, "qcom,bms-psy-name", Loading