* [PATCH] regulator: core: Add regulator_is_supported_voltage_tol()
@ 2012-11-14 7:47 Mark Brown
2012-11-14 10:08 ` Liam Girdwood
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-11-14 7:47 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, Mark Brown
If consumers wish to set voltages based on a tolerance it stands to reason
that they will also want to query for support in the same manner.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
include/linux/regulator/consumer.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 07838c9..528e32a 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -367,4 +367,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
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: core: Add regulator_is_supported_voltage_tol()
2012-11-14 7:47 [PATCH] regulator: core: Add regulator_is_supported_voltage_tol() Mark Brown
@ 2012-11-14 10:08 ` Liam Girdwood
0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2012-11-14 10:08 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel
On 14/11/12 07:47, Mark Brown wrote:
> If consumers wish to set voltages based on a tolerance it stands to reason
> that they will also want to query for support in the same manner.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-14 10:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 7:47 [PATCH] regulator: core: Add regulator_is_supported_voltage_tol() Mark Brown
2012-11-14 10:08 ` Liam Girdwood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.