mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/4] regulator: core: Allow fixed enable_time to be set in the regulator_desc
@ 2012-06-27 14:10 Mark Brown
  2012-06-27 14:10 ` [PATCH 2/4] regulator: fixed: Set enable enable_time in regulator_desc Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mark Brown @ 2012-06-27 14:10 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: linux-kernel, Mark Brown

Many regulators have a fixed specification for their enable time. Allow
this to be set in the regulator_desc as a number to save them having to
implement an explicit operation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/regulator/core.c         |    2 +-
 include/linux/regulator/driver.h |    4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 43132b6..d19480b 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1150,7 +1150,7 @@ overflow_err:
 static int _regulator_get_enable_time(struct regulator_dev *rdev)
 {
 	if (!rdev->desc->ops->enable_time)
-		return 0;
+		return rdev->desc->enable_time;
 	return rdev->desc->ops->enable_time(rdev);
 }
 
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 84f999ed..176bd43 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -180,6 +180,8 @@ enum regulator_type {
  * @vsel_mask: Mask for register bitfield used for selector
  * @enable_reg: Register for control when using regmap enable/disable ops
  * @enable_mask: Mask for control when using regmap enable/disable ops
+ *
+ * @enable_time: Time taken for initial enable of regulator (in uS).
  */
 struct regulator_desc {
 	const char *name;
@@ -201,6 +203,8 @@ struct regulator_desc {
 	unsigned int vsel_mask;
 	unsigned int enable_reg;
 	unsigned int enable_mask;
+
+	unsigned int enable_time;
 };
 
 /**
-- 
1.7.10


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

end of thread, other threads:[~2012-06-27 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-27 14:10 [PATCH 1/4] regulator: core: Allow fixed enable_time to be set in the regulator_desc Mark Brown
2012-06-27 14:10 ` [PATCH 2/4] regulator: fixed: Set enable enable_time in regulator_desc Mark Brown
2012-06-27 14:10 ` [PATCH 3/4] regulator: wm8994: Set enable_time in descriptor Mark Brown
2012-06-27 14:10 ` [PATCH 4/4] regulator: wm831x-ldo: Specify enable time for alive LDO Mark Brown

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

all inboxes | Powered by JetHome®