Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Utils functions to implement the pincontrol driver.
0004  *
0005  * Copyright (c) 2013, NVIDIA Corporation.
0006  *
0007  * Author: Laxman Dewangan <ldewangan@nvidia.com>
0008  */
0009 #ifndef __PINCTRL_UTILS_H__
0010 #define __PINCTRL_UTILS_H__
0011 
0012 int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev,
0013         struct pinctrl_map **map, unsigned *reserved_maps,
0014         unsigned *num_maps, unsigned reserve);
0015 int pinctrl_utils_add_map_mux(struct pinctrl_dev *pctldev,
0016         struct pinctrl_map **map, unsigned *reserved_maps,
0017         unsigned *num_maps, const char *group,
0018         const char *function);
0019 int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev,
0020         struct pinctrl_map **map, unsigned *reserved_maps,
0021         unsigned *num_maps, const char *group,
0022         unsigned long *configs, unsigned num_configs,
0023         enum pinctrl_map_type type);
0024 int pinctrl_utils_add_config(struct pinctrl_dev *pctldev,
0025         unsigned long **configs, unsigned *num_configs,
0026         unsigned long config);
0027 void pinctrl_utils_free_map(struct pinctrl_dev *pctldev,
0028         struct pinctrl_map *map, unsigned num_maps);
0029 
0030 #endif /* __PINCTRL_UTILS_H__ */