Loading Documentation/devicetree/bindings/power/qpnp-smbcharger.txt +3 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,9 @@ Optional Properties: this property will not adjust the AICL deglitch time dynamically for handling the battery over-voltage oscillations when the charger is headroom limited. - qcom,aicl-rerun-period-s If force-aicl-rerun is on, this property dictates how often aicl is reran in seconds. Possible values are 45, 90, 180, and 360. - qcom,ibat-ocp-threshold-ua Maximum current before the battery will trigger overcurrent protection. Use the recommended battery pack value minus some margin. Loading arch/arm/boot/dts/qcom/msm-pmi8994.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,8 @@ qcom,parallel-allowed-lowering-ma = <500>; qcom,autoadjust-vfloat; qcom,pmic-revid = <&pmi8994_revid>; qcom,force-aicl-rerun; qcom,aicl-rerun-period-s = <180>; qcom,chgr@1000 { reg = <0x1000 0x100>; Loading drivers/power/pmic-voter.c +9 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ struct client_vote { struct votable { struct client_vote votes[NUM_MAX_CLIENTS]; struct device *dev; const char *name; int num_clients; int type; int effective_client_id; Loading Loading @@ -149,6 +150,9 @@ int vote(struct votable *votable, int client_id, int state, int val) votable->votes[client_id].state = state; votable->votes[client_id].value = val; pr_debug("%s: %d voting for %d - %s\n", votable->name, client_id, val, state ? "on" : "off"); switch (votable->type) { case VOTE_MIN: effective_id = vote_min(votable); Loading Loading @@ -177,6 +181,8 @@ int vote(struct votable *votable, int client_id, int state, int val) if (effective_result != votable->effective_result) { votable->effective_client_id = effective_id; votable->effective_result = effective_result; pr_debug("%s: effective vote is now %d voted by %d", votable->name, effective_result, effective_id); rc = votable->callback(votable->dev, effective_result, effective_id, val, client_id); } Loading @@ -189,7 +195,8 @@ out: return rc; } struct votable *create_votable(struct device *dev, int votable_type, struct votable *create_votable(struct device *dev, const char *name, int votable_type, int num_clients, int (*callback)(struct device *dev, int effective_result, Loading Loading @@ -220,6 +227,7 @@ struct votable *create_votable(struct device *dev, int votable_type, } votable->dev = dev; votable->name = name; votable->num_clients = num_clients; votable->callback = callback; votable->type = votable_type; Loading drivers/power/pmic-voter.h +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ int get_effective_result_locked(struct votable *votable); int get_effective_client_id(struct votable *votable); int get_effective_client_id_locked(struct votable *votable); int vote(struct votable *votable, int client_id, int state, int val); struct votable *create_votable(struct device *dev, struct votable *create_votable(struct device *dev, const char *name, int votable_type, int num_clients, int (*callback)(struct device *dev, int effective_result, Loading Loading
Documentation/devicetree/bindings/power/qpnp-smbcharger.txt +3 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,9 @@ Optional Properties: this property will not adjust the AICL deglitch time dynamically for handling the battery over-voltage oscillations when the charger is headroom limited. - qcom,aicl-rerun-period-s If force-aicl-rerun is on, this property dictates how often aicl is reran in seconds. Possible values are 45, 90, 180, and 360. - qcom,ibat-ocp-threshold-ua Maximum current before the battery will trigger overcurrent protection. Use the recommended battery pack value minus some margin. Loading
arch/arm/boot/dts/qcom/msm-pmi8994.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,8 @@ qcom,parallel-allowed-lowering-ma = <500>; qcom,autoadjust-vfloat; qcom,pmic-revid = <&pmi8994_revid>; qcom,force-aicl-rerun; qcom,aicl-rerun-period-s = <180>; qcom,chgr@1000 { reg = <0x1000 0x100>; Loading
drivers/power/pmic-voter.c +9 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ struct client_vote { struct votable { struct client_vote votes[NUM_MAX_CLIENTS]; struct device *dev; const char *name; int num_clients; int type; int effective_client_id; Loading Loading @@ -149,6 +150,9 @@ int vote(struct votable *votable, int client_id, int state, int val) votable->votes[client_id].state = state; votable->votes[client_id].value = val; pr_debug("%s: %d voting for %d - %s\n", votable->name, client_id, val, state ? "on" : "off"); switch (votable->type) { case VOTE_MIN: effective_id = vote_min(votable); Loading Loading @@ -177,6 +181,8 @@ int vote(struct votable *votable, int client_id, int state, int val) if (effective_result != votable->effective_result) { votable->effective_client_id = effective_id; votable->effective_result = effective_result; pr_debug("%s: effective vote is now %d voted by %d", votable->name, effective_result, effective_id); rc = votable->callback(votable->dev, effective_result, effective_id, val, client_id); } Loading @@ -189,7 +195,8 @@ out: return rc; } struct votable *create_votable(struct device *dev, int votable_type, struct votable *create_votable(struct device *dev, const char *name, int votable_type, int num_clients, int (*callback)(struct device *dev, int effective_result, Loading Loading @@ -220,6 +227,7 @@ struct votable *create_votable(struct device *dev, int votable_type, } votable->dev = dev; votable->name = name; votable->num_clients = num_clients; votable->callback = callback; votable->type = votable_type; Loading
drivers/power/pmic-voter.h +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ int get_effective_result_locked(struct votable *votable); int get_effective_client_id(struct votable *votable); int get_effective_client_id_locked(struct votable *votable); int vote(struct votable *votable, int client_id, int state, int val); struct votable *create_votable(struct device *dev, struct votable *create_votable(struct device *dev, const char *name, int votable_type, int num_clients, int (*callback)(struct device *dev, int effective_result, Loading