summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorRobin Gong <B38343@freescale.com>2012-05-02 15:36:49 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:37:04 +0800
commitbb66160d603a773c9f85df07f23035ad129597f0 (patch)
tree5780bde6460622a7c3524f7f7df7e8c85f97c435 /drivers/regulator
parent778ef4e75ee9730de61351f6862f1ef6b1a2e4bf (diff)
ENGR00181348-2 :sabresd pfuze support cpu internal LDO bypass
1. need add flag to let cpu freq driver know pfuze regulator is ok or not ,so that cpu freq driver can directly used, otherwise cpu freq should use raw i2c write/read interface. 2. fix one build warning Signed-off-by: Robin Gong <B38343@freescale.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c2
-rw-r--r--drivers/regulator/pfuze100-regulator.c19
2 files changed, 20 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index bffd22fd415c..54473547b233 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -276,7 +276,7 @@ static ssize_t regulator_uV_show(struct device *dev,
return ret;
}
static ssize_t regulator_uV_store(struct device *dev,
- struct device_attribute *attr, char *buf,
+ struct device_attribute *attr, const char *buf,
size_t count)
{
struct regulator_dev *rdev = dev_get_drvdata(dev);
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index 34ca0fb45961..e2aaa2d4e889 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -657,6 +657,21 @@ static int __devexit pfuze100_regulator_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_MX6_INTER_LDO_BYPASS
+int cpu_freq_suspend_in; /*judge for in suspend or not*/
+static int pfuze100_regulator_suspend(struct platform_device *pdev,
+ pm_message_t state)
+{
+ cpu_freq_suspend_in = 1;
+ return 0;
+}
+
+static int pfuze100_regulator_resume(struct platform_device *pdev)
+{
+ cpu_freq_suspend_in = 0;
+ return 0;
+}
+#endif
static struct platform_driver pfuze100_regulator_driver = {
.driver = {
.name = "pfuze100-regulator",
@@ -664,6 +679,10 @@ static struct platform_driver pfuze100_regulator_driver = {
},
.remove = __devexit_p(pfuze100_regulator_remove),
.probe = pfuze100_regulator_probe,
+#ifdef CONFIG_MX6_INTER_LDO_BYPASS
+ .suspend = pfuze100_regulator_suspend,
+ .resume = pfuze100_regulator_resume,
+#endif
};
static int __init pfuze100_regulator_init(void)