summaryrefslogtreecommitdiff
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-10 07:43:22 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-10 07:43:22 +0400
commitf4244c68fff39b28235c862d7533c825390e9020 (patch)
tree7b2aeccdfb6cc2b40d5d372f13727e5d75aab1ad /include/linux/regulator
parent4247bfe20ab1cb8cf1874b811c0dc60bcd0249e8 (diff)
parentfe1e43f7190da98b396265639845a6cc0d748aad (diff)
downloadlinux-f4244c68fff39b28235c862d7533c825390e9020.tar.xz
Merge remote-tracking branch 'regulator/topic/tol' into regulator-next
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/consumer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 8bb7eba4ec45..7bc732ce6e50 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -372,4 +372,12 @@ static inline int regulator_set_voltage_tol(struct regulator *regulator,
new_uV - tol_uV, new_uV + tol_uV);
}
+static inline int regulator_is_supported_voltage_tol(struct regulator *regulator,
+ int target_uV, int tol_uV)
+{
+ return regulator_is_supported_voltage(regulator,
+ target_uV - tol_uV,
+ target_uV + tol_uV);
+}
+
#endif