2019-05-28 20:10:04 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2012-03-23 20:29:46 +04:00
|
|
|
/*
|
|
|
|
* Internal interface to pinctrl device tree integration
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2016-11-03 19:35:47 +03:00
|
|
|
struct of_phandle_args;
|
|
|
|
|
2012-03-23 20:29:46 +04:00
|
|
|
#ifdef CONFIG_OF
|
|
|
|
|
|
|
|
void pinctrl_dt_free_maps(struct pinctrl *p);
|
2016-12-27 20:19:59 +03:00
|
|
|
int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev);
|
2012-03-23 20:29:46 +04:00
|
|
|
|
2016-11-03 19:35:47 +03:00
|
|
|
int pinctrl_count_index_with_args(const struct device_node *np,
|
|
|
|
const char *list_name);
|
|
|
|
|
|
|
|
int pinctrl_parse_index_with_args(const struct device_node *np,
|
|
|
|
const char *list_name, int index,
|
|
|
|
struct of_phandle_args *out_args);
|
|
|
|
|
2012-03-23 20:29:46 +04:00
|
|
|
#else
|
|
|
|
|
2016-12-27 20:19:59 +03:00
|
|
|
static inline int pinctrl_dt_to_map(struct pinctrl *p,
|
|
|
|
struct pinctrl_dev *pctldev)
|
2012-03-23 20:29:46 +04:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void pinctrl_dt_free_maps(struct pinctrl *p)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-11-03 19:35:47 +03:00
|
|
|
static inline int pinctrl_count_index_with_args(const struct device_node *np,
|
|
|
|
const char *list_name)
|
|
|
|
{
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int
|
|
|
|
pinctrl_parse_index_with_args(const struct device_node *np,
|
|
|
|
const char *list_name, int index,
|
|
|
|
struct of_phandle_args *out_args)
|
|
|
|
{
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
|
|
|
|
2012-03-23 20:29:46 +04:00
|
|
|
#endif
|