Release 4.7 include/linux/gpio.h
#ifndef __LINUX_GPIO_H
#define __LINUX_GPIO_H
#include <linux/errno.h>
/* see Documentation/gpio/gpio-legacy.txt */
/* make these flag values available regardless of GPIO kconfig options */
#define GPIOF_DIR_OUT (0 << 0)
#define GPIOF_DIR_IN (1 << 0)
#define GPIOF_INIT_LOW (0 << 1)
#define GPIOF_INIT_HIGH (1 << 1)
#define GPIOF_IN (GPIOF_DIR_IN)
#define GPIOF_OUT_INIT_LOW (GPIOF_DIR_OUT | GPIOF_INIT_LOW)
#define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | GPIOF_INIT_HIGH)
/* Gpio pin is active-low */
#define GPIOF_ACTIVE_LOW (1 << 2)
/* Gpio pin is open drain */
#define GPIOF_OPEN_DRAIN (1 << 3)
/* Gpio pin is open source */
#define GPIOF_OPEN_SOURCE (1 << 4)
#define GPIOF_EXPORT (1 << 5)
#define GPIOF_EXPORT_CHANGEABLE (1 << 6)
#define GPIOF_EXPORT_DIR_FIXED (GPIOF_EXPORT)
#define GPIOF_EXPORT_DIR_CHANGEABLE (GPIOF_EXPORT | GPIOF_EXPORT_CHANGEABLE)
/**
* struct gpio - a structure describing a GPIO with configuration
* @gpio: the GPIO number
* @flags: GPIO configuration as specified by GPIOF_*
* @label: a literal description string of this GPIO
*/
struct gpio {
unsigned gpio;
unsigned long flags;
const char *label;
};
#ifdef CONFIG_GPIOLIB
#ifdef CONFIG_ARCH_HAVE_CUSTOM_GPIO_H
#include <asm/gpio.h>
#else
#include <asm-generic/gpio.h>
static inline int gpio_get_value(unsigned int gpio)
{
return __gpio_get_value(gpio);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mark brown | mark brown | 17 | 100.00% | 1 | 100.00% |
| Total | 17 | 100.00% | 1 | 100.00% |
static inline void gpio_set_value(unsigned int gpio, int value)
{
__gpio_set_value(gpio, value);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mark brown | mark brown | 21 | 100.00% | 1 | 100.00% |
| Total | 21 | 100.00% | 1 | 100.00% |
static inline int gpio_cansleep(unsigned int gpio)
{
return __gpio_cansleep(gpio);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mark brown | mark brown | 17 | 100.00% | 1 | 100.00% |
| Total | 17 | 100.00% | 1 | 100.00% |
static inline int gpio_to_irq(unsigned int gpio)
{
return __gpio_to_irq(gpio);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mark brown | mark brown | 17 | 100.00% | 1 | 100.00% |
| Total | 17 | 100.00% | 1 | 100.00% |
static inline int irq_to_gpio(unsigned int irq)
{
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mark brown | mark brown | 15 | 100.00% | 1 | 100.00% |
| Total | 15 | 100.00% | 1 | 100.00% |
#endif /* ! CONFIG_ARCH_HAVE_CUSTOM_GPIO_H */
/* CONFIG_GPIOLIB: bindings for managed devices that want to request gpios */
struct device;
int devm_gpio_request(struct device *dev, unsigned gpio, const char *label);
int devm_gpio_request_one(struct device *dev, unsigned gpio,
unsigned long flags, const char *label);
void devm_gpio_free(struct device *dev, unsigned int gpio);
#else /* ! CONFIG_GPIOLIB */
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/bug.h>
#include <linux/pinctrl/pinctrl.h>
struct device;
struct gpio_chip;
static inline bool gpio_is_valid(int number)
{
return false;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 11 | 84.62% | 1 | 50.00% |
joe perches | joe perches | 2 | 15.38% | 1 | 50.00% |
| Total | 13 | 100.00% | 2 | 100.00% |
static inline int gpio_request(unsigned gpio, const char *label)
{
return -ENOSYS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 19 | 100.00% | 1 | 100.00% |
| Total | 19 | 100.00% | 1 | 100.00% |
static inline int gpio_request_one(unsigned gpio,
unsigned long flags, const char *label)
{
return -ENOSYS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
wolfram sang | wolfram sang | 23 | 100.00% | 1 | 100.00% |
| Total | 23 | 100.00% | 1 | 100.00% |
static inline int gpio_request_array(const struct gpio *array, size_t num)
{
return -ENOSYS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
wolfram sang | wolfram sang | 19 | 95.00% | 1 | 50.00% |
lars-peter clausen | lars-peter clausen | 1 | 5.00% | 1 | 50.00% |
| Total | 20 | 100.00% | 2 | 100.00% |
static inline void gpio_free(unsigned gpio)
{
might_sleep();
/* GPIO can never have been requested */
WARN_ON(1);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 16 | 84.21% | 1 | 50.00% |
uwe kleine-koenig | uwe kleine-koenig | 3 | 15.79% | 1 | 50.00% |
| Total | 19 | 100.00% | 2 | 100.00% |
static inline void gpio_free_array(const struct gpio *array, size_t num)
{
might_sleep();
/* GPIO can never have been requested */
WARN_ON(1);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
wolfram sang | wolfram sang | 24 | 96.00% | 1 | 50.00% |
lars-peter clausen | lars-peter clausen | 1 | 4.00% | 1 | 50.00% |
| Total | 25 | 100.00% | 2 | 100.00% |
static inline int gpio_direction_input(unsigned gpio)
{
return -ENOSYS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 14 | 100.00% | 1 | 100.00% |
| Total | 14 | 100.00% | 1 | 100.00% |
static inline int gpio_direction_output(unsigned gpio, int value)
{
return -ENOSYS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 17 | 100.00% | 1 | 100.00% |
| Total | 17 | 100.00% | 1 | 100.00% |
static inline int gpio_set_debounce(unsigned gpio, unsigned debounce)
{
return -ENOSYS;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
felipe balbi | felipe balbi | 17 | 100.00% | 1 | 100.00% |
| Total | 17 | 100.00% | 1 | 100.00% |
static inline int gpio_get_value(unsigned gpio)
{
/* GPIO can never have been requested or set as {in,out}put */
WARN_ON(1);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 19 | 100.00% | 1 | 100.00% |
| Total | 19 | 100.00% | 1 | 100.00% |
static inline void gpio_set_value(unsigned gpio, int value)
{
/* GPIO can never have been requested or set as output */
WARN_ON(1);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 19 | 100.00% | 1 | 100.00% |
| Total | 19 | 100.00% | 1 | 100.00% |
static inline int gpio_cansleep(unsigned gpio)
{
/* GPIO can never have been requested or set as {in,out}put */
WARN_ON(1);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 19 | 100.00% | 1 | 100.00% |
| Total | 19 | 100.00% | 1 | 100.00% |
static inline int gpio_get_value_cansleep(unsigned gpio)
{
/* GPIO can never have been requested or set as {in,out}put */
WARN_ON(1);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 19 | 100.00% | 1 | 100.00% |
| Total | 19 | 100.00% | 1 | 100.00% |
static inline void gpio_set_value_cansleep(unsigned gpio, int value)
{
/* GPIO can never have been requested or set as output */
WARN_ON(1);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 19 | 100.00% | 1 | 100.00% |
| Total | 19 | 100.00% | 1 | 100.00% |
static inline int gpio_export(unsigned gpio, bool direction_may_change)
{
/* GPIO can never have been requested or set as {in,out}put */
WARN_ON(1);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 23 | 100.00% | 1 | 100.00% |
| Total | 23 | 100.00% | 1 | 100.00% |
static inline int gpio_export_link(struct device *dev, const char *name,
unsigned gpio)
{
/* GPIO can never have been exported */
WARN_ON(1);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
jani nikula | jani nikula | 30 | 100.00% | 1 | 100.00% |
| Total | 30 | 100.00% | 1 | 100.00% |
static inline void gpio_unexport(unsigned gpio)
{
/* GPIO can never have been exported */
WARN_ON(1);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 16 | 100.00% | 1 | 100.00% |
| Total | 16 | 100.00% | 1 | 100.00% |
static inline int gpio_to_irq(unsigned gpio)
{
/* GPIO can never have been requested or set as input */
WARN_ON(1);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 20 | 100.00% | 1 | 100.00% |
| Total | 20 | 100.00% | 1 | 100.00% |
static inline int gpiochip_lock_as_irq(struct gpio_chip *chip,
unsigned int offset)
{
WARN_ON(1);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 24 | 96.00% | 1 | 50.00% |
alexandre courbot | alexandre courbot | 1 | 4.00% | 1 | 50.00% |
| Total | 25 | 100.00% | 2 | 100.00% |
static inline void gpiochip_unlock_as_irq(struct gpio_chip *chip,
unsigned int offset)
{
WARN_ON(1);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 20 | 95.24% | 1 | 50.00% |
alexandre courbot | alexandre courbot | 1 | 4.76% | 1 | 50.00% |
| Total | 21 | 100.00% | 2 | 100.00% |
static inline int irq_to_gpio(unsigned irq)
{
/* irq can never have been returned from gpio_to_irq() */
WARN_ON(1);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 20 | 100.00% | 1 | 100.00% |
| Total | 20 | 100.00% | 1 | 100.00% |
static inline int
gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
unsigned int gpio_offset, unsigned int pin_offset,
unsigned int npins)
{
WARN_ON(1);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 19 | 50.00% | 5 | 83.33% |
shiraz hashim | shiraz hashim | 19 | 50.00% | 1 | 16.67% |
| Total | 38 | 100.00% | 6 | 100.00% |
static inline int
gpiochip_add_pingroup_range(struct gpio_chip *chip,
struct pinctrl_dev *pctldev,
unsigned int gpio_offset, const char *pin_group)
{
WARN_ON(1);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
christian ruppert | christian ruppert | 33 | 94.29% | 1 | 50.00% |
linus walleij | linus walleij | 2 | 5.71% | 1 | 50.00% |
| Total | 35 | 100.00% | 2 | 100.00% |
static inline void
gpiochip_remove_pin_ranges(struct gpio_chip *chip)
{
WARN_ON(1);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
shiraz hashim | shiraz hashim | 8 | 47.06% | 1 | 33.33% |
linus walleij | linus walleij | 7 | 41.18% | 1 | 33.33% |
christian ruppert | christian ruppert | 2 | 11.76% | 1 | 33.33% |
| Total | 17 | 100.00% | 3 | 100.00% |
static inline int devm_gpio_request(struct device *dev, unsigned gpio,
const char *label)
{
WARN_ON(1);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
shawn guo | shawn guo | 16 | 55.17% | 1 | 50.00% |
linus walleij | linus walleij | 13 | 44.83% | 1 | 50.00% |
| Total | 29 | 100.00% | 2 | 100.00% |
static inline int devm_gpio_request_one(struct device *dev, unsigned gpio,
unsigned long flags, const char *label)
{
WARN_ON(1);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
shawn guo | shawn guo | 20 | 60.61% | 1 | 50.00% |
linus walleij | linus walleij | 13 | 39.39% | 1 | 50.00% |
| Total | 33 | 100.00% | 2 | 100.00% |
static inline void devm_gpio_free(struct device *dev, unsigned int gpio)
{
WARN_ON(1);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
shawn guo | shawn guo | 12 | 57.14% | 1 | 50.00% |
linus walleij | linus walleij | 9 | 42.86% | 1 | 50.00% |
| Total | 21 | 100.00% | 2 | 100.00% |
#endif /* ! CONFIG_GPIOLIB */
#endif /* __LINUX_GPIO_H */
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david brownell | david brownell | 272 | 31.48% | 3 | 9.68% |
linus walleij | linus walleij | 166 | 19.21% | 7 | 22.58% |
mark brown | mark brown | 118 | 13.66% | 2 | 6.45% |
wolfram sang | wolfram sang | 80 | 9.26% | 2 | 6.45% |
shawn guo | shawn guo | 48 | 5.56% | 1 | 3.23% |
christian ruppert | christian ruppert | 38 | 4.40% | 1 | 3.23% |
jani nikula | jani nikula | 33 | 3.82% | 1 | 3.23% |
randy dunlap | randy dunlap | 29 | 3.36% | 1 | 3.23% |
shiraz hashim | shiraz hashim | 27 | 3.12% | 1 | 3.23% |
felipe balbi | felipe balbi | 17 | 1.97% | 1 | 3.23% |
alexandre courbot | alexandre courbot | 13 | 1.50% | 3 | 9.68% |
laxman dewangan | laxman dewangan | 8 | 0.93% | 2 | 6.45% |
uwe kleine-koenig | uwe kleine-koenig | 6 | 0.69% | 1 | 3.23% |
anton vorontsov | anton vorontsov | 3 | 0.35% | 1 | 3.23% |
joe perches | joe perches | 2 | 0.23% | 1 | 3.23% |
lars-peter clausen | lars-peter clausen | 2 | 0.23% | 1 | 3.23% |
paul gortmaker | paul gortmaker | 1 | 0.12% | 1 | 3.23% |
richard genoud | richard genoud | 1 | 0.12% | 1 | 3.23% |
| Total | 864 | 100.00% | 31 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.