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

Commit 110eeb54 authored by David Collins's avatar David Collins
Browse files

regulator: qpnp-regulator: print register values for unsupported regulators



Print out the type, subtype, and digital major revision register
values when a regulator fails to match supported variants.  This
will help when debugging PMIC simulator issues.

Change-Id: I4d0ca163921e6f14737df2977c39cf43b3d303d3
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent e589fedd
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1514,6 +1514,10 @@ static int qpnp_regulator_match(struct qpnp_regulator *vreg)
		}
	}

	if (rc)
		vreg_err(vreg, "unsupported regulator: type=0x%02X, subtype=0x%02X, dig major rev=0x%02X\n",
			type, subtype, dig_major_rev);

	return rc;
}

@@ -1895,10 +1899,8 @@ static int qpnp_regulator_probe(struct spmi_device *spmi)
	dev_set_drvdata(&spmi->dev, vreg);

	rc = qpnp_regulator_match(vreg);
	if (rc) {
		vreg_err(vreg, "regulator type unknown, rc=%d\n", rc);
	if (rc)
		goto bail;
	}

	if (is_dt && rdesc->ops) {
		/* Fill in ops and mode masks when using device tree. */