]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00181348-2 :sabresd pfuze support cpu internal LDO bypass
authorRobin Gong <B38343@freescale.com>
Wed, 2 May 2012 07:36:49 +0000 (15:36 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:34 +0000 (08:34 +0200)
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>
drivers/regulator/core.c
drivers/regulator/pfuze100-regulator.c

index bffd22fd415cb1a5824338534e8c73a9a6dc3eca..54473547b233c62089fab143362f3128e3a35777 100644 (file)
@@ -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);
index 34ca0fb4596111fb0df5434c25c5bddbb84f886f..e2aaa2d4e8898da0ea41ef8405e27ccd2a5fcf6e 100644 (file)
@@ -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)