From 70f0df8fac0ca77355737d5e8614fa7ec174fc10 Mon Sep 17 00:00:00 2001 From: Johnny Qiu Date: Wed, 1 Feb 2012 13:46:01 +0800 Subject: regulator: max77663: add support for VDD_RTC tracking to VDD_CORE Bug 920845 Change-Id: Id84218efaeebcc834fdac6e0e5c30adc60a13ebc Signed-off-by: Johnny Qiu Signed-off-by: Hao Tang Reviewed-on: http://git-master/r/83727 Reviewed-by: Dan Willemsen Reviewed-by: Liangchuan Mi Tested-by: Liangchuan Mi Reviewed-by: Sachin Nikam --- drivers/regulator/max77663-regulator.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'drivers/regulator') 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; } -- cgit v1.2.3