pinctrl-utils.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Utils functions to implement the pincontrol driver.
  3. *
  4. * Copyright (c) 2013, NVIDIA Corporation.
  5. *
  6. * Author: Laxman Dewangan <ldewangan@nvidia.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation version 2.
  11. *
  12. * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
  13. * whether express or implied; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  20. * 02111-1307, USA
  21. */
  22. #ifndef __PINCTRL_UTILS_H__
  23. #define __PINCTRL_UTILS_H__
  24. int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev,
  25. struct pinctrl_map **map, unsigned *reserved_maps,
  26. unsigned *num_maps, unsigned reserve);
  27. int pinctrl_utils_add_map_mux(struct pinctrl_dev *pctldev,
  28. struct pinctrl_map **map, unsigned *reserved_maps,
  29. unsigned *num_maps, const char *group,
  30. const char *function);
  31. int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev,
  32. struct pinctrl_map **map, unsigned *reserved_maps,
  33. unsigned *num_maps, const char *group,
  34. unsigned long *configs, unsigned num_configs,
  35. enum pinctrl_map_type type);
  36. int pinctrl_utils_add_config(struct pinctrl_dev *pctldev,
  37. unsigned long **configs, unsigned *num_configs,
  38. unsigned long config);
  39. void pinctrl_utils_free_map(struct pinctrl_dev *pctldev,
  40. struct pinctrl_map *map, unsigned num_maps);
  41. #endif /* __PINCTRL_UTILS_H__ */