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