printf: Remove unused 'bprintf'
[drm/drm-misc.git] / include / linux / of_gpio.h
blobd0f66a5e1b2a7254df8beab0a14807249fd92dfc
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * OF helpers for the GPIO API
5 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
8 */
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 */
16 #include <linux/of.h>
18 struct device_node;
20 #ifdef CONFIG_OF_GPIO
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)
33 return -ENOSYS;
36 #endif /* CONFIG_OF_GPIO */
38 #endif /* __LINUX_OF_GPIO_H */