aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorKrystian Garbaciak <krystian.garbaciak@diasemi.com>2012-07-12 13:53:35 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-12 18:19:24 +0100
commit1beaf762b4ad5f53876f790bb6cfbd3bac072985 (patch)
treee8b47e3f8fde22e6558f570f3c1141b9d61074a1 /drivers/regulator
parent03ffcf3d0838bd5e693cd4520becfb22577cf34d (diff)
regulator: Add REGULATOR_STATUS_UNDEFINED.
REGULATOR_STATUS_UNDEFINED is to be returned by regulator, if any other state doesn't really apply. Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 4b136f8cb99f..01a67c50c4ea 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -393,6 +393,9 @@ static ssize_t regulator_status_show(struct device *dev,
case REGULATOR_STATUS_STANDBY:
label = "standby";
break;
+ case REGULATOR_STATUS_UNDEFINED:
+ label = "undefined";
+ break;
default:
return -ERANGE;
}
@@ -2897,7 +2900,7 @@ int regulator_mode_to_status(unsigned int mode)
case REGULATOR_MODE_STANDBY:
return REGULATOR_STATUS_STANDBY;
default:
- return 0;
+ return REGULATOR_STATUS_UNDEFINED;
}
}
EXPORT_SYMBOL_GPL(regulator_mode_to_status);