Release 4.12 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 | 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 | 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 | 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 | 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 | 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 | 11 | 84.62% | 1 | 50.00% |
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 | 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 | 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 | 19 | 95.00% | 1 | 50.00% |
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 | 16 | 84.21% | 1 | 50.00% |
Uwe Kleine-König | 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 | 24 | 96.00% | 1 | 50.00% |
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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 24 | 96.00% | 1 | 50.00% |
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 | 20 | 95.24% | 1 | 50.00% |
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 | 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 |
Shiraz Hashim | 19 | 50.00% | 1 | 16.67% |
Linus Walleij | 19 | 50.00% | 5 | 83.33% |
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 | 33 | 94.29% | 1 | 50.00% |
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 | 8 | 47.06% | 1 | 33.33% |
Linus Walleij | 7 | 41.18% | 1 | 33.33% |
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 | 16 | 55.17% | 1 | 50.00% |
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 | 20 | 60.61% | 1 | 50.00% |
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 | 12 | 57.14% | 1 | 50.00% |
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 | 272 | 31.48% | 3 | 9.68% |
Linus Walleij | 166 | 19.21% | 7 | 22.58% |
Mark Brown | 118 | 13.66% | 2 | 6.45% |
Wolfram Sang | 80 | 9.26% | 2 | 6.45% |
Shawn Guo | 48 | 5.56% | 1 | 3.23% |
Christian Ruppert | 38 | 4.40% | 1 | 3.23% |
Jani Nikula | 33 | 3.82% | 1 | 3.23% |
Randy Dunlap | 29 | 3.36% | 1 | 3.23% |
Shiraz Hashim | 27 | 3.12% | 1 | 3.23% |
Felipe Balbi | 17 | 1.97% | 1 | 3.23% |
Alexandre Courbot | 13 | 1.50% | 3 | 9.68% |
Laxman Dewangan | 8 | 0.93% | 2 | 6.45% |
Uwe Kleine-König | 6 | 0.69% | 1 | 3.23% |
Anton Vorontsov | 3 | 0.35% | 1 | 3.23% |
Joe Perches | 2 | 0.23% | 1 | 3.23% |
Lars-Peter Clausen | 2 | 0.23% | 1 | 3.23% |
Richard Genoud | 1 | 0.12% | 1 | 3.23% |
Paul Gortmaker | 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.