diff options
author | David Brown <davidb@codeaurora.org> | 2011-05-16 22:32:15 +0200 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2011-08-01 13:58:00 +0200 |
commit | 030a77fc9b805a38a2ffaea42728557282b81275 (patch) | |
tree | cfa523bf81db0c49e88c7ef4b5fef3c50d775b8d /arch/arm/mach-msm/include | |
parent | msm: gpio: Remove ifdefs on gpio chip registers (diff) | |
download | linux-030a77fc9b805a38a2ffaea42728557282b81275.tar.xz linux-030a77fc9b805a38a2ffaea42728557282b81275.zip |
msm: gpiomux: Move public API to public header
The gpiomux.h header contains some SOC ifdefs. However, the API that
is actually used by the GPIO driver only uses two functions that are
general. Move these general definitions into a public header file.
Change-Id: Ia5df8af87dba268225598d56908e523bcfc24ef6
Signed-off-by: David Brown <davidb@codeaurora.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/mach-msm/include')
-rw-r--r-- | arch/arm/mach-msm/include/mach/msm_gpiomux.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/include/mach/msm_gpiomux.h b/arch/arm/mach-msm/include/mach/msm_gpiomux.h new file mode 100644 index 000000000000..0c7d3936e02f --- /dev/null +++ b/arch/arm/mach-msm/include/mach/msm_gpiomux.h @@ -0,0 +1,38 @@ +/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _LINUX_MSM_GPIOMUX_H +#define _LINUX_MSM_GPIOMUX_H + +#ifdef CONFIG_MSM_GPIOMUX + +/* Increment a gpio's reference count, possibly activating the line. */ +int __must_check msm_gpiomux_get(unsigned gpio); + +/* Decrement a gpio's reference count, possibly suspending the line. */ +int msm_gpiomux_put(unsigned gpio); + +#else + +static inline int __must_check msm_gpiomux_get(unsigned gpio) +{ + return -ENOSYS; +} + +static inline int msm_gpiomux_put(unsigned gpio) +{ + return -ENOSYS; +} + +#endif + +#endif /* _LINUX_MSM_GPIOMUX_H */ |