Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / pinctrl / devicetree.h
blobdef76aba99d17c8fde08afdcfab5e9fc342dfd46
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Internal interface to pinctrl device tree integration
5 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
6 */
8 #include <linux/errno.h>
10 struct device_node;
11 struct of_phandle_args;
13 struct pinctrl;
14 struct pinctrl_dev;
16 #ifdef CONFIG_OF
18 void pinctrl_dt_free_maps(struct pinctrl *p);
19 int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev);
21 int pinctrl_count_index_with_args(const struct device_node *np,
22 const char *list_name);
24 int pinctrl_parse_index_with_args(const struct device_node *np,
25 const char *list_name, int index,
26 struct of_phandle_args *out_args);
28 #else
30 static inline int pinctrl_dt_to_map(struct pinctrl *p,
31 struct pinctrl_dev *pctldev)
33 return 0;
36 static inline void pinctrl_dt_free_maps(struct pinctrl *p)
40 static inline int pinctrl_count_index_with_args(const struct device_node *np,
41 const char *list_name)
43 return -ENODEV;
46 static inline int
47 pinctrl_parse_index_with_args(const struct device_node *np,
48 const char *list_name, int index,
49 struct of_phandle_args *out_args)
51 return -ENODEV;
54 #endif