Linux Audio

Check our new training course

Loading...
v6.8
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 * Internal interface to pinctrl device tree integration
 4 *
 5 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
 
 
 
 
 
 
 
 
 
 
 
 
 6 */
 7
 8#include <linux/errno.h>
 9
10struct device_node;
11struct of_phandle_args;
12
13struct pinctrl;
14struct pinctrl_dev;
15
16#ifdef CONFIG_OF
17
18void pinctrl_dt_free_maps(struct pinctrl *p);
19int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev);
20
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
28#else
29
30static inline int pinctrl_dt_to_map(struct pinctrl *p,
31				    struct pinctrl_dev *pctldev)
32{
33	return 0;
34}
35
36static inline void pinctrl_dt_free_maps(struct pinctrl *p)
37{
38}
39
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
54#endif
v3.5.6
 
 1/*
 2 * Internal interface to pinctrl device tree integration
 3 *
 4 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
 5 *
 6 * This program is free software; you can redistribute it and/or modify it
 7 * under the terms and conditions of the GNU General Public License,
 8 * version 2, as published by the Free Software Foundation.
 9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 */
18
 
 
 
 
 
 
 
 
19#ifdef CONFIG_OF
20
21void pinctrl_dt_free_maps(struct pinctrl *p);
22int pinctrl_dt_to_map(struct pinctrl *p);
 
 
 
 
 
 
 
23
24#else
25
26static inline int pinctrl_dt_to_map(struct pinctrl *p)
 
27{
28	return 0;
29}
30
31static inline void pinctrl_dt_free_maps(struct pinctrl *p)
32{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33}
34
35#endif