summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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