pinctrl-utils.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Utils functions to implement the pincontrol driver.
  4. *
  5. * Copyright (c) 2013, NVIDIA Corporation.
  6. *
  7. * Author: Laxman Dewangan <[email protected]>
  8. */
  9. #ifndef __PINCTRL_UTILS_H__
  10. #define __PINCTRL_UTILS_H__
  11. int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev,
  12. struct pinctrl_map **map, unsigned *reserved_maps,
  13. unsigned *num_maps, unsigned reserve);
  14. int pinctrl_utils_add_map_mux(struct pinctrl_dev *pctldev,
  15. struct pinctrl_map **map, unsigned *reserved_maps,
  16. unsigned *num_maps, const char *group,
  17. const char *function);
  18. int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev,
  19. struct pinctrl_map **map, unsigned *reserved_maps,
  20. unsigned *num_maps, const char *group,
  21. unsigned long *configs, unsigned num_configs,
  22. enum pinctrl_map_type type);
  23. int pinctrl_utils_add_config(struct pinctrl_dev *pctldev,
  24. unsigned long **configs, unsigned *num_configs,
  25. unsigned long config);
  26. void pinctrl_utils_free_map(struct pinctrl_dev *pctldev,
  27. struct pinctrl_map *map, unsigned num_maps);
  28. #endif /* __PINCTRL_UTILS_H__ */