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

Commit 0bcb4e94 authored by David Collins's avatar David Collins
Browse files

regulator: cpr3-regulator: BUG if an unsupported CPR fuse combo is found



The cpr3-regulator driver must perform voltage and quotient
adjustments which are tied to specific CPR fuse combinations.
Applying incorrect adjustments can lead to excess power
consumption or crashes.  Therefore, call BUG_ON() if the fuse
combo found on a given chip is not supported by the device tree
configurations of a cpr3-regulator device.

Change-Id: If5b539c9050975c9ce9c44d13e50a09be300bb3f
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 0938d30a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -404,8 +404,9 @@ int cpr3_parse_common_corner_data(struct cpr3_regulator *vreg,
	}

	if (vreg->fuse_combo >= max_fuse_combos) {
		cpr3_err(vreg, "device tree config supports fuse combos 0-%u but the hardware has config %d\n",
		cpr3_err(vreg, "device tree config supports fuse combos 0-%u but the hardware has combo %d\n",
			max_fuse_combos - 1, vreg->fuse_combo);
		BUG_ON(1);
		return -EINVAL;
	}