diff options
author | Gregory Bean <gbean@codeaurora.org> | 2010-09-01 19:26:12 -0400 |
---|---|---|
committer | Daniel Walker <dwalker@codeaurora.org> | 2010-10-06 12:01:18 -0400 |
commit | ab78cde589e89afa039a13bc75d23d249f1c1200 (patch) | |
tree | db69fd9d16ad7bc2f94da2e46effca08404cf4fe /arch | |
parent | 10c4580e798838fd63eafec5ed304b7ace6db020 (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')
-rw-r--r-- | arch/arm/mach-msm/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/mach-msm/gpiomux.h | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 4e79580af628..f09ffef4cda8 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig | |||
@@ -18,6 +18,7 @@ config ARCH_MSM7X30 | |||
18 | select MSM_VIC | 18 | select MSM_VIC |
19 | select CPU_V7 | 19 | select CPU_V7 |
20 | select MSM_REMOTE_SPINLOCK_DEKKERS | 20 | select MSM_REMOTE_SPINLOCK_DEKKERS |
21 | select MSM_GPIOMUX | ||
21 | 22 | ||
22 | config ARCH_QSD8X50 | 23 | config ARCH_QSD8X50 |
23 | bool "QSD8X50" | 24 | bool "QSD8X50" |
@@ -26,6 +27,7 @@ config ARCH_QSD8X50 | |||
26 | select MSM_VIC | 27 | select MSM_VIC |
27 | select CPU_V7 | 28 | select CPU_V7 |
28 | select MSM_REMOTE_SPINLOCK_LDREX | 29 | select MSM_REMOTE_SPINLOCK_LDREX |
30 | select MSM_GPIOMUX | ||
29 | endchoice | 31 | endchoice |
30 | 32 | ||
31 | config MSM_SOC_REV_A | 33 | config MSM_SOC_REV_A |
@@ -106,6 +108,9 @@ config MSM_SMD_PKG3 | |||
106 | config MSM_SMD | 108 | config MSM_SMD |
107 | bool | 109 | bool |
108 | 110 | ||
111 | config MSM_GPIOMUX | ||
112 | bool | ||
113 | |||
109 | config MSM_V2_TLMM | 114 | config MSM_V2_TLMM |
110 | bool | 115 | bool |
111 | endif | 116 | endif |
diff --git a/arch/arm/mach-msm/gpiomux.h b/arch/arm/mach-msm/gpiomux.h index bb0acf0c9644..b178d9cb742f 100644 --- a/arch/arm/mach-msm/gpiomux.h +++ b/arch/arm/mach-msm/gpiomux.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define __ARCH_ARM_MACH_MSM_GPIOMUX_H | 18 | #define __ARCH_ARM_MACH_MSM_GPIOMUX_H |
19 | 19 | ||
20 | #include <linux/bitops.h> | 20 | #include <linux/bitops.h> |
21 | #include <linux/errno.h> | ||
21 | 22 | ||
22 | #if defined(CONFIG_MSM_V2_TLMM) | 23 | #if defined(CONFIG_MSM_V2_TLMM) |
23 | #include "gpiomux-v2.h" | 24 | #include "gpiomux-v2.h" |
@@ -60,6 +61,8 @@ enum { | |||
60 | GPIOMUX_CTL_MASK = GPIOMUX_VALID, | 61 | GPIOMUX_CTL_MASK = GPIOMUX_VALID, |
61 | }; | 62 | }; |
62 | 63 | ||
64 | #ifdef CONFIG_MSM_GPIOMUX | ||
65 | |||
63 | /* Each architecture must provide its own instance of this table. | 66 | /* Each architecture must provide its own instance of this table. |
64 | * To avoid having gpiomux manage any given gpio, one or both of | 67 | * To avoid having gpiomux manage any given gpio, one or both of |
65 | * the entries can avoid setting GPIOMUX_VALID - the absence | 68 | * the entries can avoid setting GPIOMUX_VALID - the absence |
@@ -90,5 +93,22 @@ int msm_gpiomux_write(unsigned gpio, | |||
90 | * should use msm_gpiomux_write. | 93 | * should use msm_gpiomux_write. |
91 | */ | 94 | */ |
92 | void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val); | 95 | void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val); |
96 | #else | ||
97 | static inline int __must_check msm_gpiomux_get(unsigned gpio) | ||
98 | { | ||
99 | return -ENOSYS; | ||
100 | } | ||
93 | 101 | ||
102 | static inline int msm_gpiomux_put(unsigned gpio) | ||
103 | { | ||
104 | return -ENOSYS; | ||
105 | } | ||
106 | |||
107 | static inline int msm_gpiomux_write(unsigned gpio, | ||
108 | gpiomux_config_t active, | ||
109 | gpiomux_config_t suspended) | ||
110 | { | ||
111 | return -ENOSYS; | ||
112 | } | ||
113 | #endif | ||
94 | #endif | 114 | #endif |