public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: twl: Add 'fixed' set_voltage callback
@ 2011-06-23 20:46 Jassi Brar
  2011-06-24 11:19 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Jassi Brar @ 2011-06-23 20:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: ti, linux-omap, lrg, broonie, sameo, Jassi Brar

Define dummy set_voltage callback for fixed lines,
without which voltage constraints fail to apply.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
---
 drivers/regulator/twl-regulator.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 87fe0f7..8223e49 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -591,10 +591,18 @@ static int twlfixed_get_voltage(struct regulator_dev *rdev)
 	return info->min_mV * 1000;
 }
 
+static int twlfixed_set_voltage(struct regulator_dev *rdev,
+	int min_uV, int max_uV, unsigned *selector)
+{
+	*selector = min_uV / 1000;
+	return 0;
+}
+
 static struct regulator_ops twl4030fixed_ops = {
 	.list_voltage	= twlfixed_list_voltage,
 
 	.get_voltage	= twlfixed_get_voltage,
+	.set_voltage	= twlfixed_set_voltage,
 
 	.enable		= twl4030reg_enable,
 	.disable	= twl4030reg_disable,
@@ -609,6 +617,7 @@ static struct regulator_ops twl6030fixed_ops = {
 	.list_voltage	= twlfixed_list_voltage,
 
 	.get_voltage	= twlfixed_get_voltage,
+	.set_voltage	= twlfixed_set_voltage,
 
 	.enable		= twl6030reg_enable,
 	.disable	= twl6030reg_disable,
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-24 13:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-23 20:46 [PATCH] regulator: twl: Add 'fixed' set_voltage callback Jassi Brar
2011-06-24 11:19 ` Mark Brown
2011-06-24 13:06   ` Jaswinder Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox