msm-cdc-pinctrl.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
  3. */
  4. #ifndef __MFD_CDC_PINCTRL_H_
  5. #define __MFD_CDC_PINCTRL_H_
  6. #include <linux/types.h>
  7. #include <linux/of.h>
  8. #if IS_ENABLED(CONFIG_MSM_CDC_PINCTRL)
  9. extern int msm_cdc_pinctrl_select_sleep_state(struct device_node *np);
  10. extern int msm_cdc_pinctrl_select_active_state(struct device_node *np);
  11. extern int msm_cdc_pinctrl_select_alt_active_state(struct device_node *np);
  12. extern int msm_cdc_pinctrl_get_state(struct device_node *np);
  13. extern int msm_cdc_get_gpio_state(struct device_node *np);
  14. extern int msm_cdc_pinctrl_set_wakeup_capable(struct device_node *np,
  15. bool enable);
  16. int msm_cdc_pinctrl_drv_init(void);
  17. void msm_cdc_pinctrl_drv_exit(void);
  18. #else
  19. int msm_cdc_pinctrl_select_sleep_state(struct device_node *np)
  20. {
  21. return 0;
  22. }
  23. int msm_cdc_pinctrl_select_active_state(struct device_node *np)
  24. {
  25. return 0;
  26. }
  27. int msm_cdc_pinctrl_select_alt_active_state(struct device_node *np)
  28. {
  29. return 0;
  30. }
  31. int msm_cdc_get_gpio_state(struct device_node *np)
  32. {
  33. return 0;
  34. }
  35. int msm_cdc_pinctrl_drv_init(void)
  36. {
  37. return 0;
  38. }
  39. void msm_cdc_pinctrl_drv_exit(void)
  40. {
  41. }
  42. int msm_cdc_pinctrl_get_state(struct device_node *np)
  43. {
  44. return true;
  45. }
  46. static int msm_cdc_pinctrl_set_wakeup_capable(struct device_node *np,
  47. bool enable)
  48. {
  49. return 0;
  50. }
  51. #endif
  52. #endif