twl-regulator: Define critical regulators as always_on

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, December 17, 2009 - 9:59 am

Gitweb:     http://git.kernel.org/linus/205e5cd3d933a9ea7b75630355c8f8ec5ef16f6c
Commit:     205e5cd3d933a9ea7b75630355c8f8ec5ef16f6c
Parent:     07fc493f03019b5a98de1a498ab1b235afc394db
Author:     Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com>
AuthorDate: Wed Dec 16 15:27:56 2009 +0200
Committer:  Liam Girdwood <lrg@slimlogic.co.uk>
CommitDate: Thu Dec 17 10:27:28 2009 +0000

    twl-regulator: Define critical regulators as always_on
    
    Defines VIO, VDD1, VDD2, VPLL1 and VINT* regulators as always_on by default
    since they are critical to TWL and its master's functionality and should
    be on in all cases where RegFW is used
    
    Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com>
    Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
---
 drivers/regulator/twl-regulator.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 43d7494..aadf4cf 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -533,6 +533,19 @@ static int twlreg_probe(struct platform_device *pdev)
 	c->valid_ops_mask &= REGULATOR_CHANGE_VOLTAGE
 				| REGULATOR_CHANGE_MODE
 				| REGULATOR_CHANGE_STATUS;
+	switch (pdev->id) {
+	case TWL4030_REG_VIO:
+	case TWL4030_REG_VDD1:
+	case TWL4030_REG_VDD2:
+	case TWL4030_REG_VPLL1:
+	case TWL4030_REG_VINTANA1:
+	case TWL4030_REG_VINTANA2:
+	case TWL4030_REG_VINTDIG:
+		c->always_on = true;
+		break;
+	default:
+		break;
+	}
 
 	rdev = regulator_register(&info->desc, &pdev->dev, initdata, info);
 	if (IS_ERR(rdev)) {
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
twl-regulator: Define critical regulators as always_on, Linux Kernel Mailing ..., (Thu Dec 17, 9:59 am)