msm-audio-pinctrl.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* Copyright (c) 2015-2017, The Linux Foundation. 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 __MSM_AUDIO_PINCTRL_H
  13. #define __MSM_AUDIO_PINCTRL_H
  14. enum pinctrl_client {
  15. CLIENT_WCD,
  16. CLIENT_WSA_BONGO_1,
  17. CLIENT_WSA_BONGO_2,
  18. MAX_PINCTRL_CLIENT,
  19. };
  20. /* finds the index for the gpio set in the dtsi file */
  21. int msm_get_gpioset_index(enum pinctrl_client client, char *keyword);
  22. /*
  23. * this function reads the following from dtsi file
  24. * 1. all gpio sets
  25. * 2. all combinations of gpio sets
  26. * 3. pinctrl handles to gpio sets
  27. *
  28. * returns error if there is
  29. * 1. problem reading from dtsi file
  30. * 2. memory allocation failure
  31. */
  32. int msm_gpioset_initialize(enum pinctrl_client client, struct device *dev);
  33. int msm_gpioset_activate(enum pinctrl_client client, char *keyword);
  34. int msm_gpioset_suspend(enum pinctrl_client client, char *keyword);
  35. #endif /* __MSM_AUDIO_PINCTRL_H */