]> Git Repo - linux.git/blame - drivers/pinctrl/devicetree.h
Merge tag 'drm-intel-gt-next-2023-10-12' of git://anongit.freedesktop.org/drm/drm...
[linux.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
e5530adc
AS
8#include <linux/errno.h>
9
10struct device_node;
42124bc5
TL
11struct of_phandle_args;
12
e5530adc
AS
13struct pinctrl;
14struct pinctrl_dev;
15
57291ce2
SW
16#ifdef CONFIG_OF
17
18void pinctrl_dt_free_maps(struct pinctrl *p);
99e4f675 19int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev);
57291ce2 20
42124bc5
TL
21int pinctrl_count_index_with_args(const struct device_node *np,
22 const char *list_name);
23
24int pinctrl_parse_index_with_args(const struct device_node *np,
25 const char *list_name, int index,
26 struct of_phandle_args *out_args);
27
57291ce2
SW
28#else
29
99e4f675
TL
30static inline int pinctrl_dt_to_map(struct pinctrl *p,
31 struct pinctrl_dev *pctldev)
57291ce2
SW
32{
33 return 0;
34}
35
36static inline void pinctrl_dt_free_maps(struct pinctrl *p)
37{
38}
39
42124bc5
TL
40static inline int pinctrl_count_index_with_args(const struct device_node *np,
41 const char *list_name)
42{
43 return -ENODEV;
44}
45
46static inline int
47pinctrl_parse_index_with_args(const struct device_node *np,
48 const char *list_name, int index,
49 struct of_phandle_args *out_args)
50{
51 return -ENODEV;
52}
53
57291ce2 54#endif
This page took 0.767663 seconds and 4 git commands to generate.