X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fregulator%2Ftps6586x-regulator.c;h=cfc1f16f777125152678dfbdef3402d28e80c1cd;hb=4a1e8ebc5e5918079109cc1cd1c44c2f0fd0e11b;hp=29b615ce3affa75c259937c42cfb4fdc1401ff1c;hpb=2533c2cfbff8f0ee53b8448d6362b54c272125aa;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index 29b615ce3aff..cfc1f16f7771 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -79,6 +79,11 @@ static int tps6586x_ldo_list_voltage(struct regulator_dev *rdev, unsigned selector) { struct tps6586x_regulator *info = rdev_get_drvdata(rdev); + int rid = rdev_get_id(rdev); + + /* LDO0 has minimal voltage 1.2V rather than 1.25V */ + if ((rid == TPS6586X_ID_LDO_0) && (selector == 0)) + return (info->voltages[0] - 50) * 1000; return info->voltages[selector] * 1000; }