[U-Boot] [PATCH 28/55] dm: pmic: max77686: Support all BUCK regulators
Simon Glass
sjg at chromium.org
Fri Jul 3 02:16:05 CEST 2015
Add support for all BUCK regulators, now that the correct register is
accessed for each.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
drivers/power/regulator/max77686.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c
index 21173fc..427b717 100644
--- a/drivers/power/regulator/max77686.c
+++ b/drivers/power/regulator/max77686.c
@@ -81,11 +81,7 @@ static int max77686_buck_volt2hex(int buck, int uV)
/* hex = (uV - 600000) / 12500; */
hex = (uV - MAX77686_BUCK_UV_LMIN) / MAX77686_BUCK_UV_LSTEP;
hex_max = MAX77686_BUCK234_VOLT_MAX_HEX;
- /**
- * Those use voltage scaller - temporary not implemented
- * so return just 0
- */
- return -ENOSYS;
+ break;
default:
/* hex = (uV - 750000) / 50000; */
hex = (uV - MAX77686_BUCK_UV_HMIN) / MAX77686_BUCK_UV_HSTEP;
@@ -379,11 +375,11 @@ static int max77686_buck_val(struct udevice *dev, int op, int *uV)
case 2:
case 3:
case 4:
- /* Those use voltage scallers - will support in the future */
mask = MAX77686_BUCK234_VOLT_MASK;
- return -ENOSYS;
+ break;
default:
mask = MAX77686_BUCK_VOLT_MASK;
+ break;
}
ret = pmic_read(dev->parent, adr, &val, 1);
--
2.4.3.573.g4eafbef
More information about the U-Boot
mailing list