msm_gpiomux.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. #ifndef _LINUX_MSM_GPIOMUX_H
  13. #define _LINUX_MSM_GPIOMUX_H
  14. #ifdef CONFIG_MSM_GPIOMUX
  15. /* Increment a gpio's reference count, possibly activating the line. */
  16. int __must_check msm_gpiomux_get(unsigned gpio);
  17. /* Decrement a gpio's reference count, possibly suspending the line. */
  18. int msm_gpiomux_put(unsigned gpio);
  19. #else
  20. static inline int __must_check msm_gpiomux_get(unsigned gpio)
  21. {
  22. return -ENOSYS;
  23. }
  24. static inline int msm_gpiomux_put(unsigned gpio)
  25. {
  26. return -ENOSYS;
  27. }
  28. #endif
  29. #endif /* _LINUX_MSM_GPIOMUX_H */