summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHarry Hong <hhong@nvidia.com>2011-09-01 20:22:11 +0900
committerVarun Colbert <vcolbert@nvidia.com>2011-09-02 18:06:04 -0700
commit4a77f4129671b2cf94088f27bc9172670e5ed8a0 (patch)
treef12992044b6d16828d56fbbaba2ab93940467489 /drivers
parentacb275bcd7f0076d98a1862722f16af0caef90e4 (diff)
regulator: max77663: Active-discharge mode for SDx
Adding Active-discharge option for SDx rails. bug 859415 Change-Id: Ia4d3933b9dbf4a0ec646c586f99a7411d2a93371 Reviewed-on: http://git-master/r/50281 Tested-by: Harry Hong <hhong@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers')
-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;