Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6549bad4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-smbcharger: read realtime status for battery ov"

parents dcbdbebe 9d526c3a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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.
+2 −0
Original line number Diff line number Diff line
@@ -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>;
+9 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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);
@@ -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);
	}
@@ -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,
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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