Thread (29 messages) 29 messages, 6 authors, 2014-04-11
STALE4452d

Re: [PATCH v3 06/10] regulator: AXP20x: Add support for regulators subsystem

From: Mark Brown <hidden>
Date: 2014-03-28 13:39:34
Also in: linux-arm-kernel

On Thu, Mar 27, 2014 at 10:29:20PM +0100, Carlo Caione wrote:
+static int axp20x_set_suspend_voltage(struct regulator_dev *rdev, int uV)
+{
+	int sel = regulator_map_voltage_iterate(rdev, uV, uV);
+
+	if (sel < 0)
+		return sel;
+
+	return regulator_set_voltage_sel_regmap(rdev, sel);
+}
This is fairly obviously broken - it's overwriting the normal runtime
value, this will disrupt the running system if we want the value we use
on suspend is different to the value we want at runtime.

Think about it - if this was a sane thing to do the core would just do
it without needing driver specific code, we already know how to set the
voltage for the device.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help