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