aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-msm/gpiomux.h
diff options
context:
space:
mode:
authorGregory Bean <gbean@codeaurora.org>2010-09-01 16:26:12 -0700
committerDaniel Walker <dwalker@codeaurora.org>2010-10-06 09:01:18 -0700
commitab78cde589e89afa039a13bc75d23d249f1c1200 (patch)
treedb69fd9d16ad7bc2f94da2e46effca08404cf4fe /arch/arm/mach-msm/gpiomux.h
parent10c4580e798838fd63eafec5ed304b7ace6db020 (diff)
msm: Featurize gpiomux.
Featurize gpiomux so that systems like 7x00 which do not wish to use it do not have to be saddled with the configuration tables. Signed-off-by: Gregory Bean <gbean@codeaurora.org> Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Diffstat (limited to 'arch/arm/mach-msm/gpiomux.h')
-rw-r--r--arch/arm/mach-msm/gpiomux.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/gpiomux.h b/arch/arm/mach-msm/gpiomux.h
index bb0acf0c964..b178d9cb742 100644
--- a/arch/arm/mach-msm/gpiomux.h
+++ b/arch/arm/mach-msm/gpiomux.h
@@ -18,6 +18,7 @@
#define __ARCH_ARM_MACH_MSM_GPIOMUX_H
#include <linux/bitops.h>
+#include <linux/errno.h>
#if defined(CONFIG_MSM_V2_TLMM)
#include "gpiomux-v2.h"
@@ -60,6 +61,8 @@ enum {
GPIOMUX_CTL_MASK = GPIOMUX_VALID,
};
+#ifdef CONFIG_MSM_GPIOMUX
+
/* Each architecture must provide its own instance of this table.
* To avoid having gpiomux manage any given gpio, one or both of
* the entries can avoid setting GPIOMUX_VALID - the absence
@@ -90,5 +93,22 @@ int msm_gpiomux_write(unsigned gpio,
* should use msm_gpiomux_write.
*/
void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val);
+#else
+static inline int __must_check msm_gpiomux_get(unsigned gpio)
+{
+ return -ENOSYS;
+}
+static inline int msm_gpiomux_put(unsigned gpio)
+{
+ return -ENOSYS;
+}
+
+static inline int msm_gpiomux_write(unsigned gpio,
+ gpiomux_config_t active,
+ gpiomux_config_t suspended)
+{
+ return -ENOSYS;
+}
+#endif
#endif