summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/gpiomux.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-06-15 03:26:26 +0200
committerOlof Johansson <olof@lixom.net>2013-06-15 03:28:02 +0200
commite45600107b6700237f22f2d1d853bd49d8168f68 (patch)
tree078d1d011e9e197b3758ba22b7e11621fccab13f /arch/arm/mach-msm/gpiomux.c
parentMerge tag 'msm-fix-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
parentmfd: ssbi: Use devm_* and simplify code (diff)
downloadlinux-e45600107b6700237f22f2d1d853bd49d8168f68.tar.xz
linux-e45600107b6700237f22f2d1d853bd49d8168f68.zip
Merge tag 'msm-cleanup-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into next/cleanup
From David Brown: Cleanups for MSM for 3.11 These are a handful of cleanups to the MSM tree. The gpio cleanups get us closer to having proper pinmux and gpio support. * tag 'msm-cleanup-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm: mfd: ssbi: Use devm_* and simplify code gpio: msm: Add device tree and irqdomain support for gpio-msm-v2 ARM: msm: Remove gpiomux-v2 and re-organize MSM_GPIOMUX configs msm: iomap: Remove unused bases and mappings msm: Remove unused file core.h ARM: msm: Remove init_irq declaration in machine description Signed-off-by: Olof Johansson <olof@lixom.net> Conflicts: arch/arm/boot/dts/msm8660-surf.dts arch/arm/boot/dts/msm8960-cdp.dts
Diffstat (limited to 'arch/arm/mach-msm/gpiomux.c')
-rw-r--r--arch/arm/mach-msm/gpiomux.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/gpiomux.c b/arch/arm/mach-msm/gpiomux.c
index 53af21abd155..2b8e2d217082 100644
--- a/arch/arm/mach-msm/gpiomux.c
+++ b/arch/arm/mach-msm/gpiomux.c
@@ -17,9 +17,24 @@
#include <linux/module.h>
#include <linux/spinlock.h>
#include "gpiomux.h"
+#include "proc_comm.h"
static DEFINE_SPINLOCK(gpiomux_lock);
+static void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val)
+{
+ unsigned tlmm_config = (val & ~GPIOMUX_CTL_MASK) |
+ ((gpio & 0x3ff) << 4);
+ unsigned tlmm_disable = 0;
+ int rc;
+
+ rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX,
+ &tlmm_config, &tlmm_disable);
+ if (rc)
+ pr_err("%s: unexpected proc_comm failure %d: %08x %08x\n",
+ __func__, rc, tlmm_config, tlmm_disable);
+}
+
int msm_gpiomux_write(unsigned gpio,
gpiomux_config_t active,
gpiomux_config_t suspended)