1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * OF helpers for the GPIO API
5 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
10 #ifndef __LINUX_OF_GPIO_H
11 #define __LINUX_OF_GPIO_H
13 #include <linux/compiler.h>
14 #include <linux/gpio/driver.h>
15 #include <linux/gpio.h> /* FIXME: Shouldn't be here */
22 extern int of_get_named_gpio(const struct device_node
*np
,
23 const char *list_name
, int index
);
25 #else /* CONFIG_OF_GPIO */
27 #include <linux/errno.h>
29 /* Drivers may not strictly depend on the GPIO support, so let them link. */
30 static inline int of_get_named_gpio(const struct device_node
*np
,
31 const char *propname
, int index
)
36 #endif /* CONFIG_OF_GPIO */
38 #endif /* __LINUX_OF_GPIO_H */