summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorHarry Hong <hhong@nvidia.com>2011-09-01 20:22:11 +0900
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:48:49 -0800
commitaaa03cbf9ca43689e49d86ebcd6f3a51c4d757f4 (patch)
tree080c4ab0a7e3775554abd7fb93f62c8132e4dab9 /drivers/regulator
parent88d9501b29bfa2df6486fccf15c8dab8a33e72b9 (diff)
regulator: max77663: Active-discharge mode for SDx
Adding Active-discharge option for SDx rails. bug 859415 Original-Change-Id: Ia4d3933b9dbf4a0ec646c586f99a7411d2a93371 Reviewed-on: http://git-master/r/50281 Tested-by: Harry Hong <hhong@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: Rac11236a7f0f305f0e821c5a8f911e5751bd2c82
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/max77663-regulator.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/regulator/max77663-regulator.c b/drivers/regulator/max77663-regulator.c
index c7d4e4f267f8..1d5715387ac6 100644
--- a/drivers/regulator/max77663-regulator.c
+++ b/drivers/regulator/max77663-regulator.c
@@ -86,6 +86,10 @@
#define SD_FPWM_MASK 0x04
#define SD_FPWM_SHIFT 2
+/* SD Failling slew rate Active-Discharge Mode */
+#define SD_FSRADE_MASK 0x01
+#define SD_FSRADE_SHIFT 0
+
/* Voltage */
#define SDX_VOLT_MASK 0xFF
#define SD1_VOLT_MASK 0x3F
@@ -552,6 +556,16 @@ skip_init_apply:
}
}
+ if (pdata->flags & SD_FSRADE_DISABLE) {
+ ret = max77663_set_bits(parent, reg->cfg_reg,
+ SD_FSRADE_MASK, SD_FSRADE_MASK, 0);
+ if (ret < 0) {
+ dev_err(reg->dev, "preinit: "
+ "Failed to set falling slew-rate discharge mode\n");
+ return ret;
+ }
+ }
+
if ((reg->id == MAX77663_REGULATOR_ID_SD0)
&& (pdata->flags & EN2_CTRL_SD0)) {
val = POWER_MODE_DISABLE;