treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201
[linux-2.6-block.git] / drivers / pinctrl / devicetree.h
CommitLineData
9952f691 1/* SPDX-License-Identifier: GPL-2.0-only */
57291ce2
SW
2/*
3 * Internal interface to pinctrl device tree integration
4 *
5 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
57291ce2
SW
6 */
7
42124bc5
TL
8struct of_phandle_args;
9
57291ce2
SW
10#ifdef CONFIG_OF
11
99e4f675
TL
12bool pinctrl_dt_has_hogs(struct pinctrl_dev *pctldev);
13
57291ce2 14void pinctrl_dt_free_maps(struct pinctrl *p);
99e4f675 15int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev);
57291ce2 16
42124bc5
TL
17int pinctrl_count_index_with_args(const struct device_node *np,
18 const char *list_name);
19
20int pinctrl_parse_index_with_args(const struct device_node *np,
21 const char *list_name, int index,
22 struct of_phandle_args *out_args);
23
57291ce2
SW
24#else
25
99e4f675
TL
26static inline bool pinctrl_dt_has_hogs(struct pinctrl_dev *pctldev)
27{
28 return false;
29}
30
31static inline int pinctrl_dt_to_map(struct pinctrl *p,
32 struct pinctrl_dev *pctldev)
57291ce2
SW
33{
34 return 0;
35}
36
37static inline void pinctrl_dt_free_maps(struct pinctrl *p)
38{
39}
40
42124bc5
TL
41static inline int pinctrl_count_index_with_args(const struct device_node *np,
42 const char *list_name)
43{
44 return -ENODEV;
45}
46
47static inline int
48pinctrl_parse_index_with_args(const struct device_node *np,
49 const char *list_name, int index,
50 struct of_phandle_args *out_args)
51{
52 return -ENODEV;
53}
54
57291ce2 55#endif