blob: efa80779de4f45f2d31df1088e23938e94ee0c35 [file] [log] [blame]
Thomas Gleixner9952f692019-05-28 10:10:04 -07001/* SPDX-License-Identifier: GPL-2.0-only */
Stephen Warren57291ce2012-03-23 10:29:46 -06002/*
3 * Internal interface to pinctrl device tree integration
4 *
5 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
Stephen Warren57291ce2012-03-23 10:29:46 -06006 */
7
Tony Lindgren42124bc2016-11-03 09:35:47 -07008struct of_phandle_args;
9
Stephen Warren57291ce2012-03-23 10:29:46 -060010#ifdef CONFIG_OF
11
12void pinctrl_dt_free_maps(struct pinctrl *p);
Tony Lindgren99e4f672016-12-27 09:19:59 -080013int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev);
Stephen Warren57291ce2012-03-23 10:29:46 -060014
Tony Lindgren42124bc2016-11-03 09:35:47 -070015int pinctrl_count_index_with_args(const struct device_node *np,
16 const char *list_name);
17
18int pinctrl_parse_index_with_args(const struct device_node *np,
19 const char *list_name, int index,
20 struct of_phandle_args *out_args);
21
Stephen Warren57291ce2012-03-23 10:29:46 -060022#else
23
Tony Lindgren99e4f672016-12-27 09:19:59 -080024static inline int pinctrl_dt_to_map(struct pinctrl *p,
25 struct pinctrl_dev *pctldev)
Stephen Warren57291ce2012-03-23 10:29:46 -060026{
27 return 0;
28}
29
30static inline void pinctrl_dt_free_maps(struct pinctrl *p)
31{
32}
33
Tony Lindgren42124bc2016-11-03 09:35:47 -070034static inline int pinctrl_count_index_with_args(const struct device_node *np,
35 const char *list_name)
36{
37 return -ENODEV;
38}
39
40static inline int
41pinctrl_parse_index_with_args(const struct device_node *np,
42 const char *list_name, int index,
43 struct of_phandle_args *out_args)
44{
45 return -ENODEV;
46}
47
Stephen Warren57291ce2012-03-23 10:29:46 -060048#endif