summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBengt Jonsson <bengt.g.jonsson@stericsson.com>2011-11-16 17:13:03 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 10:59:18 +0200
commit23784b0dbe7e13accf9a60edfa574a9995b9f771 (patch)
treeb2cb94f478a562b35d3a4c913d39d19d6e262703 /drivers
parent9b3a6cb1d6f2c69e3dab0e89dba842a76f463f74 (diff)
regulator: ab8500-ext: Add suspend support
Operations regulator_suspend_enable and regulator_suspend_disable are added. ST-Ericsson Linux next: - ST-Ericsson ID: 374223 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ic692e0f9850dab385c2fc0ea2289a90685c73a34 Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/37699 Reviewed-by: Mattias NILSSON <mattias.i.nilsson@stericsson.com> Reviewed-by: QABUILD Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/ab8500-ext.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c
index 223f8ca01a7..28db5c8ef4e 100644
--- a/drivers/regulator/ab8500-ext.c
+++ b/drivers/regulator/ab8500-ext.c
@@ -105,6 +105,13 @@ static int ab8500_ext_regulator_enable(struct regulator_dev *rdev)
return ret;
}
+static int ab8500_ext_regulator_set_suspend_enable(struct regulator_dev *rdev)
+{
+ dev_dbg(rdev_get_dev(rdev), "suspend: ");
+
+ return ab8500_ext_regulator_enable(rdev);
+}
+
static int disable(struct ab8500_ext_regulator_info *info, u8 *regval)
{
int ret;
@@ -150,6 +157,13 @@ static int ab8500_ext_regulator_disable(struct regulator_dev *rdev)
return ret;
}
+static int ab8500_ext_regulator_set_suspend_disable(struct regulator_dev *rdev)
+{
+ dev_dbg(rdev_get_dev(rdev), "suspend: ");
+
+ return ab8500_ext_regulator_disable(rdev);
+}
+
static int ab8500_ext_regulator_is_enabled(struct regulator_dev *rdev)
{
int ret;
@@ -214,7 +228,9 @@ static int ab8500_ext_list_voltage(struct regulator_dev *rdev,
static struct regulator_ops ab8500_ext_regulator_ops = {
.enable = ab8500_ext_regulator_enable,
+ .set_suspend_enable = ab8500_ext_regulator_set_suspend_enable,
.disable = ab8500_ext_regulator_disable,
+ .set_suspend_disable = ab8500_ext_regulator_set_suspend_disable,
.is_enabled = ab8500_ext_regulator_is_enabled,
.get_voltage = ab8500_ext_fixed_get_voltage,
.list_voltage = ab8500_ext_list_voltage,