treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / pinctrl / devicetree.h
blobefa80779de4f45f2d31df1088e23938e94ee0c35
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 struct of_phandle_args;
10 #ifdef CONFIG_OF
12 void pinctrl_dt_free_maps(struct pinctrl *p);
13 int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev);
15 int pinctrl_count_index_with_args(const struct device_node *np,
16 const char *list_name);
18 int pinctrl_parse_index_with_args(const struct device_node *np,
19 const char *list_name, int index,
20 struct of_phandle_args *out_args);
22 #else
24 static inline int pinctrl_dt_to_map(struct pinctrl *p,
25 struct pinctrl_dev *pctldev)
27 return 0;
30 static inline void pinctrl_dt_free_maps(struct pinctrl *p)
34 static inline int pinctrl_count_index_with_args(const struct device_node *np,
35 const char *list_name)
37 return -ENODEV;
40 static inline int
41 pinctrl_parse_index_with_args(const struct device_node *np,
42 const char *list_name, int index,
43 struct of_phandle_args *out_args)
45 return -ENODEV;
48 #endif