MLK-13615-1 regulator: pf1550-regulator-rpmsg: should set voltage closest to min_uV
authorDong Aisheng <aisheng.dong@nxp.com>
Wed, 14 Dec 2016 22:54:45 +0000 (06:54 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:57:59 +0000 (14:57 -0500)
According to API definition, Set the voltage for the regulator within the
range specified, the driver should select the voltage closest to min_uV.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
drivers/regulator/pf1550-regulator-rpmsg.c

index 5151528..0bebc7e 100644 (file)
@@ -168,7 +168,7 @@ static int pf1550_set_voltage(struct regulator_dev *reg,
 
        msg.cmd = PF1550_SET_VOL;
        msg.regulator = reg->desc->id;
-       msg.voltage = uV;
+       msg.voltage = minuV;
 
        err = pf1550_send_message(&msg, info);
        if (err)