Files
linux-kernelorg-stable/include/linux/of_gpio.h
T

39 lines
878 B
C
Raw Normal View History

2017-12-27 12:55:14 -06:00
/* SPDX-License-Identifier: GPL-2.0+ */
2008-04-11 23:06:45 +10:00
/*
* OF helpers for the GPIO API
*
* Copyright (c) 2007-2008 MontaVista Software, Inc.
*
* Author: Anton Vorontsov <avorontsov@ru.mvista.com>
*/
#ifndef __LINUX_OF_GPIO_H
#define __LINUX_OF_GPIO_H
2008-12-01 06:30:04 +00:00
#include <linux/compiler.h>
#include <linux/gpio/driver.h>
#include <linux/gpio.h> /* FIXME: Shouldn't be here */
#include <linux/of.h>
2008-04-11 23:06:45 +10:00
2008-12-01 06:30:04 +00:00
struct device_node;
2008-04-11 23:06:45 +10:00
#ifdef CONFIG_OF_GPIO
extern int of_get_named_gpio(const struct device_node *np,
const char *list_name, int index);
#else /* CONFIG_OF_GPIO */
2008-04-11 23:06:45 +10:00
#include <linux/errno.h>
2008-04-11 23:06:45 +10:00
/* Drivers may not strictly depend on the GPIO support, so let them link. */
static inline int of_get_named_gpio(const struct device_node *np,
const char *propname, int index)
2008-04-11 23:06:45 +10:00
{
return -ENOSYS;
2008-04-11 23:06:45 +10:00
}
#endif /* CONFIG_OF_GPIO */
#endif /* __LINUX_OF_GPIO_H */