Commit | Line | Data |
---|---|---|
030a77fc DB |
1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License version 2 and | |
5 | * only version 2 as published by the Free Software Foundation. | |
6 | * | |
7 | * This program is distributed in the hope that it will be useful, | |
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 | * GNU General Public License for more details. | |
11 | */ | |
12 | ||
13 | #ifndef _LINUX_MSM_GPIOMUX_H | |
14 | #define _LINUX_MSM_GPIOMUX_H | |
15 | ||
16 | #ifdef CONFIG_MSM_GPIOMUX | |
17 | ||
18 | /* Increment a gpio's reference count, possibly activating the line. */ | |
19 | int __must_check msm_gpiomux_get(unsigned gpio); | |
20 | ||
21 | /* Decrement a gpio's reference count, possibly suspending the line. */ | |
22 | int msm_gpiomux_put(unsigned gpio); | |
23 | ||
24 | #else | |
25 | ||
26 | static inline int __must_check msm_gpiomux_get(unsigned gpio) | |
27 | { | |
28 | return -ENOSYS; | |
29 | } | |
30 | ||
31 | static inline int msm_gpiomux_put(unsigned gpio) | |
32 | { | |
33 | return -ENOSYS; | |
34 | } | |
35 | ||
36 | #endif | |
37 | ||
38 | #endif /* _LINUX_MSM_GPIOMUX_H */ |