summaryrefslogtreecommitdiff
path: root/drivers/regulator/max77663-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/max77663-regulator.c')
-rw-r--r--drivers/regulator/max77663-regulator.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/regulator/max77663-regulator.c b/drivers/regulator/max77663-regulator.c
index c961ab05d2b0..560475062888 100644
--- a/drivers/regulator/max77663-regulator.c
+++ b/drivers/regulator/max77663-regulator.c
@@ -2,8 +2,8 @@
* drivers/regulator/max77663-regulator.c
* Maxim LDO and Buck regulators driver
*
- * Copyright 2011 Maxim Integrated Products, Inc.
- * Copyright (C) 2011 NVIDIA Corporation
+ * Copyright 2011-2012 Maxim Integrated Products, Inc.
+ * Copyright (C) 2011-2012 NVIDIA Corporation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -64,6 +64,7 @@
#define MAX77663_REG_LDO7_CFG2 0x32
#define MAX77663_REG_LDO8_CFG 0x33
#define MAX77663_REG_LDO8_CFG2 0x34
+#define MAX77663_REG_LDO_CFG3 0x35
/* Power Mode */
#define POWER_MODE_NORMAL 3
@@ -91,6 +92,10 @@
#define SD_FSRADE_MASK 0x01
#define SD_FSRADE_SHIFT 0
+/* LDO Configuration 3 */
+#define TRACK4_MASK 0x20
+#define TRACK4_SHIFT 5
+
/* Voltage */
#define SDX_VOLT_MASK 0xFF
#define SD1_VOLT_MASK 0x3F
@@ -730,6 +735,18 @@ skip_init_apply:
}
}
+ if ((reg->id == MAX77663_REGULATOR_ID_LDO4)
+ && (pdata->flags & LDO4_EN_TRACKING)) {
+ val = TRACK4_MASK;
+ ret = max77663_write(_to_parent(reg), MAX77663_REG_LDO_CFG3, &val, 1, 0);
+ if (ret < 0) {
+ dev_err(reg->dev, "preinit: "
+ "Failed to set register 0x%x\n",
+ MAX77663_REG_LDO_CFG3);
+ return ret;
+ }
+ }
+
return 0;
}