* [PATCH] msm: Featurize gpiomux.
@ 2010-09-01 23:26 Gregory Bean
2010-09-01 23:35 ` Daniel Walker
0 siblings, 1 reply; 3+ messages in thread
From: Gregory Bean @ 2010-09-01 23:26 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
arch/arm/mach-msm/Kconfig | 5 +++++
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 4e79580..f09ffef 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -18,6 +18,7 @@ config ARCH_MSM7X30
select MSM_VIC
select CPU_V7
select MSM_REMOTE_SPINLOCK_DEKKERS
+ select MSM_GPIOMUX
config ARCH_QSD8X50
bool "QSD8X50"
@@ -26,6 +27,7 @@ config ARCH_QSD8X50
select MSM_VIC
select CPU_V7
select MSM_REMOTE_SPINLOCK_LDREX
+ select MSM_GPIOMUX
endchoice
config MSM_SOC_REV_A
@@ -106,6 +108,9 @@ config MSM_SMD_PKG3
config MSM_SMD
bool
+config MSM_GPIOMUX
+ bool
+
config MSM_V2_TLMM
bool
endif
diff --git a/arch/arm/mach-msm/gpiomux.h b/arch/arm/mach-msm/gpiomux.h
index bb0acf0..b178d9c 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
--
1.7.0.4
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] msm: Featurize gpiomux.
2010-09-01 23:26 [PATCH] msm: Featurize gpiomux Gregory Bean
@ 2010-09-01 23:35 ` Daniel Walker
2010-09-01 23:53 ` Gregory Bean
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Walker @ 2010-09-01 23:35 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 2010-09-01 at 16:26 -0700, Gregory Bean wrote:
> Featurize gpiomux so that systems like 7x00 which do not wish to use it
> do not have to be saddled with the configuration tables.
>
What happens without this?
Daniel
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] msm: Featurize gpiomux.
2010-09-01 23:35 ` Daniel Walker
@ 2010-09-01 23:53 ` Gregory Bean
0 siblings, 0 replies; 3+ messages in thread
From: Gregory Bean @ 2010-09-01 23:53 UTC (permalink / raw)
To: linux-arm-kernel
> On Wed, 2010-09-01 at 16:26 -0700, Gregory Bean wrote:
>> Featurize gpiomux so that systems like 7x00 which do not wish to use it
>> do not have to be saddled with the configuration tables.
>>
>
> What happens without this?
Not much, until the gpiolib hooks come along (see my next two patches),
and then everybody would be forced to have the gpiomux config table
without the featurization. And for those folks not using it, that's a
big empty table full of annoying nothingness...
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-01 23:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-01 23:26 [PATCH] msm: Featurize gpiomux Gregory Bean
2010-09-01 23:35 ` Daniel Walker
2010-09-01 23:53 ` Gregory Bean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).