summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Aaberg <jonas.aberg@stericsson.com>2011-09-26 08:26:38 +0200
committerJonas ABERG <jonas.aberg@stericsson.com>2011-09-29 09:07:09 +0200
commit73708744a98d7627586aa1a522fb5b1b59de4cdb (patch)
tree23e92ec4ab84f4c733df56bbbefb3ed2f5fd360b
parente29d0cdb460ee10096b7c6d564f98bed9e0ea7fd (diff)
ux500: Move atomic regulator header file
Atomic regulators should be placed in a regulator include file, not in mfd. Change-Id: I5fecdfd4f0aaed48b30b119cd22ab13a8b740417 Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32136
-rw-r--r--arch/arm/mach-ux500/pm/runtime.c2
-rw-r--r--drivers/crypto/ux500/cryp/cryp_core.c2
-rw-r--r--drivers/crypto/ux500/hash/hash_core.c2
-rw-r--r--include/linux/mfd/dbx500-prcmu.h74
-rw-r--r--include/linux/regulator/dbx500-prcmu.h84
5 files changed, 87 insertions, 77 deletions
diff --git a/arch/arm/mach-ux500/pm/runtime.c b/arch/arm/mach-ux500/pm/runtime.c
index 839b6a007b3..34a85431824 100644
--- a/arch/arm/mach-ux500/pm/runtime.c
+++ b/arch/arm/mach-ux500/pm/runtime.c
@@ -17,7 +17,7 @@
#include <linux/pm_runtime.h>
#include <linux/platform_device.h>
#include <linux/amba/bus.h>
-#include <linux/mfd/dbx500-prcmu.h>
+#include <linux/regulator/dbx500-prcmu.h>
#include <linux/clk.h>
#include <plat/pincfg.h>
diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c
index f778c6d143f..5893abb57dc 100644
--- a/drivers/crypto/ux500/cryp/cryp_core.c
+++ b/drivers/crypto/ux500/cryp/cryp_core.c
@@ -20,7 +20,7 @@
#include <linux/klist.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/mfd/dbx500-prcmu.h>
+#include <linux/regulator/dbx500-prcmu.h>
#include <linux/semaphore.h>
#include <crypto/aes.h>
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c
index a5325943ecc..08a89eeb601 100644
--- a/drivers/crypto/ux500/hash/hash_core.c
+++ b/drivers/crypto/ux500/hash/hash_core.c
@@ -21,7 +21,7 @@
#include <linux/platform_device.h>
#include <linux/crypto.h>
-#include <linux/mfd/dbx500-prcmu.h>
+#include <linux/regulator/dbx500-prcmu.h>
#include <linux/bitops.h>
#include <crypto/internal/hash.h>
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index a9b660d0527..c58060fa8d4 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -552,78 +552,4 @@ static inline void prcmu_qos_voice_call_override(bool enable) {}
t
#endif
-struct ux500_regulator;
-
-#ifdef CONFIG_REGULATOR
-/*
- * NOTE! The device will be connected to the correct regulator by this
- * new framework. A list with connections will match up dev_name(dev)
- * to the specific regulator. This follows the same principle as the
- * normal regulator framework.
- *
- * This framework shall only be used in special cases when a regulator
- * has to be enabled/disabled in atomic context.
- */
-
-/**
- * ux500_regulator_get()
- *
- * @dev: Drivers device struct
- *
- * Returns a ux500_regulator struct. Shall be used as argument for
- * ux500_regulator_atomic_enable/disable calls.
- * Return ERR_PTR(-EINVAL) upon no matching regulator found.
- */
-struct ux500_regulator *__must_check ux500_regulator_get(struct device *dev);
-
-/**
- * ux500_regulator_atomic_enable()
- *
- * @regulator: Regulator handle, provided from ux500_regulator_get.
- *
- * The enable/disable functions keep an internal counter, so every
- * enable must be paired with an disable in order to turn off regulator.
- */
-int ux500_regulator_atomic_enable(struct ux500_regulator *regulator);
-
-/**
- * ux500_regulator_atomic_disable()
- *
- * @regulator: Regulator handle, provided from ux500_regulator_get.
- *
- */
-int ux500_regulator_atomic_disable(struct ux500_regulator *regulator);
-
-/**
- * ux500_regulator_put()
- *
- * @regulator: Regulator handle, provided from ux500_regulator_get.
- */
-void ux500_regulator_put(struct ux500_regulator *regulator);
-
-#else
-
-static inline struct ux500_regulator *__must_check
-ux500_regulator_get(struct device *dev)
-{
- return ERR_PTR(-EINVAL);
-}
-
-static inline int
-ux500_regulator_atomic_enable(struct ux500_regulator *regulator)
-{
- return -EINVAL;
-}
-
-static inline int
-ux500_regulator_atomic_disable(struct ux500_regulator *regulator)
-{
- return -EINVAL;
-}
-
-static inline void ux500_regulator_put(struct ux500_regulator *regulator)
-{
-}
-#endif /* CONFIG_REGULATOR */
-
#endif /* __MACH_PRCMU_H */
diff --git a/include/linux/regulator/dbx500-prcmu.h b/include/linux/regulator/dbx500-prcmu.h
new file mode 100644
index 00000000000..789c535c748
--- /dev/null
+++ b/include/linux/regulator/dbx500-prcmu.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) ST Ericsson SA 2011
+ *
+ * License Terms: GNU General Public License v2
+ *
+ */
+#ifndef __LINUX_REGULATOR_DBX500_H
+#define __LINUX_REGULATOR_DBX500_H
+
+struct ux500_regulator;
+
+#ifdef CONFIG_REGULATOR
+/*
+ * NOTE! The device will be connected to the correct regulator by this
+ * new framework. A list with connections will match up dev_name(dev)
+ * to the specific regulator. This follows the same principle as the
+ * normal regulator framework.
+ *
+ * This framework shall only be used in special cases when a regulator
+ * has to be enabled/disabled in atomic context.
+ */
+
+/**
+ * ux500_regulator_get()
+ *
+ * @dev: Drivers device struct
+ *
+ * Returns a ux500_regulator struct. Shall be used as argument for
+ * ux500_regulator_atomic_enable/disable calls.
+ * Return ERR_PTR(-EINVAL) upon no matching regulator found.
+ */
+struct ux500_regulator *__must_check ux500_regulator_get(struct device *dev);
+
+/**
+ * ux500_regulator_atomic_enable()
+ *
+ * @regulator: Regulator handle, provided from ux500_regulator_get.
+ *
+ * The enable/disable functions keep an internal counter, so every
+ * enable must be paired with an disable in order to turn off regulator.
+ */
+int ux500_regulator_atomic_enable(struct ux500_regulator *regulator);
+
+/**
+ * ux500_regulator_atomic_disable()
+ *
+ * @regulator: Regulator handle, provided from ux500_regulator_get.
+ *
+ */
+int ux500_regulator_atomic_disable(struct ux500_regulator *regulator);
+
+/**
+ * ux500_regulator_put()
+ *
+ * @regulator: Regulator handle, provided from ux500_regulator_get.
+ */
+void ux500_regulator_put(struct ux500_regulator *regulator);
+
+#else
+
+static inline struct ux500_regulator *__must_check
+ux500_regulator_get(struct device *dev)
+{
+ return ERR_PTR(-EINVAL);
+}
+
+static inline int
+ux500_regulator_atomic_enable(struct ux500_regulator *regulator)
+{
+ return -EINVAL;
+}
+
+static inline int
+ux500_regulator_atomic_disable(struct ux500_regulator *regulator)
+{
+ return -EINVAL;
+}
+
+static inline void ux500_regulator_put(struct ux500_regulator *regulator)
+{
+}
+#endif /* CONFIG_REGULATOR */
+
+#endif