2019-05-29 00:10:04 +07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2012-03-23 23:29:46 +07:00
|
|
|
/*
|
|
|
|
* Internal interface to pinctrl device tree integration
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2016-11-03 23:35:47 +07:00
|
|
|
struct of_phandle_args;
|
|
|
|
|
2012-03-23 23:29:46 +07:00
|
|
|
#ifdef CONFIG_OF
|
|
|
|
|
|
|
|
void pinctrl_dt_free_maps(struct pinctrl *p);
|
2016-12-28 00:19:59 +07:00
|
|
|
int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev);
|
2012-03-23 23:29:46 +07:00
|
|
|
|
2016-11-03 23:35:47 +07: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 23:29:46 +07:00
|
|
|
#else
|
|
|
|
|
2016-12-28 00:19:59 +07:00
|
|
|
static inline int pinctrl_dt_to_map(struct pinctrl *p,
|
|
|
|
struct pinctrl_dev *pctldev)
|
2012-03-23 23:29:46 +07:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void pinctrl_dt_free_maps(struct pinctrl *p)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-11-03 23:35:47 +07: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 23:29:46 +07:00
|
|
|
#endif
|