1*e634cf4eSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 21eb207a9SLaxman Dewangan /* 31eb207a9SLaxman Dewangan * Utils functions to implement the pincontrol driver. 41eb207a9SLaxman Dewangan * 51eb207a9SLaxman Dewangan * Copyright (c) 2013, NVIDIA Corporation. 61eb207a9SLaxman Dewangan * 71eb207a9SLaxman Dewangan * Author: Laxman Dewangan <ldewangan@nvidia.com> 81eb207a9SLaxman Dewangan */ 91eb207a9SLaxman Dewangan #ifndef __PINCTRL_UTILS_H__ 101eb207a9SLaxman Dewangan #define __PINCTRL_UTILS_H__ 111eb207a9SLaxman Dewangan 121eb207a9SLaxman Dewangan int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev, 131eb207a9SLaxman Dewangan struct pinctrl_map **map, unsigned *reserved_maps, 141eb207a9SLaxman Dewangan unsigned *num_maps, unsigned reserve); 151eb207a9SLaxman Dewangan int pinctrl_utils_add_map_mux(struct pinctrl_dev *pctldev, 161eb207a9SLaxman Dewangan struct pinctrl_map **map, unsigned *reserved_maps, 171eb207a9SLaxman Dewangan unsigned *num_maps, const char *group, 181eb207a9SLaxman Dewangan const char *function); 191eb207a9SLaxman Dewangan int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev, 201eb207a9SLaxman Dewangan struct pinctrl_map **map, unsigned *reserved_maps, 211eb207a9SLaxman Dewangan unsigned *num_maps, const char *group, 221eb207a9SLaxman Dewangan unsigned long *configs, unsigned num_configs, 231eb207a9SLaxman Dewangan enum pinctrl_map_type type); 241eb207a9SLaxman Dewangan int pinctrl_utils_add_config(struct pinctrl_dev *pctldev, 251eb207a9SLaxman Dewangan unsigned long **configs, unsigned *num_configs, 261eb207a9SLaxman Dewangan unsigned long config); 27d32f7fd3SIrina Tirdea void pinctrl_utils_free_map(struct pinctrl_dev *pctldev, 281eb207a9SLaxman Dewangan struct pinctrl_map *map, unsigned num_maps); 291eb207a9SLaxman Dewangan 301eb207a9SLaxman Dewangan #endif /* __PINCTRL_UTILS_H__ */ 31