devicetree.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Internal interface to pinctrl device tree integration
  4. *
  5. * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
  6. */
  7. struct of_phandle_args;
  8. #ifdef CONFIG_OF
  9. void pinctrl_dt_free_maps(struct pinctrl *p);
  10. int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev);
  11. int pinctrl_count_index_with_args(const struct device_node *np,
  12. const char *list_name);
  13. int pinctrl_parse_index_with_args(const struct device_node *np,
  14. const char *list_name, int index,
  15. struct of_phandle_args *out_args);
  16. #else
  17. static inline int pinctrl_dt_to_map(struct pinctrl *p,
  18. struct pinctrl_dev *pctldev)
  19. {
  20. return 0;
  21. }
  22. static inline void pinctrl_dt_free_maps(struct pinctrl *p)
  23. {
  24. }
  25. static inline int pinctrl_count_index_with_args(const struct device_node *np,
  26. const char *list_name)
  27. {
  28. return -ENODEV;
  29. }
  30. static inline int
  31. pinctrl_parse_index_with_args(const struct device_node *np,
  32. const char *list_name, int index,
  33. struct of_phandle_args *out_args)
  34. {
  35. return -ENODEV;
  36. }
  37. #endif