Release 4.7 include/linux/pinctrl/consumer.h
/*
* Consumer interface the pin control subsystem
*
* Copyright (C) 2012 ST-Ericsson SA
* Written on behalf of Linaro for ST-Ericsson
* Based on bits of regulator core, gpio core and clk core
*
* Author: Linus Walleij <linus.walleij@linaro.org>
*
* License terms: GNU General Public License (GPL) version 2
*/
#ifndef __LINUX_PINCTRL_CONSUMER_H
#define __LINUX_PINCTRL_CONSUMER_H
#include <linux/err.h>
#include <linux/list.h>
#include <linux/seq_file.h>
#include <linux/pinctrl/pinctrl-state.h>
/* This struct is private to the core and should be regarded as a cookie */
struct pinctrl;
struct pinctrl_state;
struct device;
#ifdef CONFIG_PINCTRL
/* External interface to pin control */
extern int pinctrl_request_gpio(unsigned gpio);
extern void pinctrl_free_gpio(unsigned gpio);
extern int pinctrl_gpio_direction_input(unsigned gpio);
extern int pinctrl_gpio_direction_output(unsigned gpio);
extern struct pinctrl * __must_check pinctrl_get(struct device *dev);
extern void pinctrl_put(struct pinctrl *p);
extern struct pinctrl_state * __must_check pinctrl_lookup_state(
struct pinctrl *p,
const char *name);
extern int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *s);
extern struct pinctrl * __must_check devm_pinctrl_get(struct device *dev);
extern void devm_pinctrl_put(struct pinctrl *p);
#ifdef CONFIG_PM
extern int pinctrl_pm_select_default_state(struct device *dev);
extern int pinctrl_pm_select_sleep_state(struct device *dev);
extern int pinctrl_pm_select_idle_state(struct device *dev);
#else
static inline int pinctrl_pm_select_default_state(struct device *dev)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 15 | 100.00% | 1 | 100.00% |
| Total | 15 | 100.00% | 1 | 100.00% |
static inline int pinctrl_pm_select_sleep_state(struct device *dev)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 15 | 100.00% | 1 | 100.00% |
| Total | 15 | 100.00% | 1 | 100.00% |
static inline int pinctrl_pm_select_idle_state(struct device *dev)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 15 | 100.00% | 1 | 100.00% |
| Total | 15 | 100.00% | 1 | 100.00% |
#endif
#else /* !CONFIG_PINCTRL */
static inline int pinctrl_request_gpio(unsigned gpio)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 13 | 100.00% | 2 | 100.00% |
| Total | 13 | 100.00% | 2 | 100.00% |
static inline void pinctrl_free_gpio(unsigned gpio)
{
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 9 | 100.00% | 2 | 100.00% |
| Total | 9 | 100.00% | 2 | 100.00% |
static inline int pinctrl_gpio_direction_input(unsigned gpio)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 13 | 100.00% | 2 | 100.00% |
| Total | 13 | 100.00% | 2 | 100.00% |
static inline int pinctrl_gpio_direction_output(unsigned gpio)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 13 | 100.00% | 2 | 100.00% |
| Total | 13 | 100.00% | 2 | 100.00% |
static inline struct pinctrl * __must_check pinctrl_get(struct device *dev)
{
return NULL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 18 | 100.00% | 3 | 100.00% |
| Total | 18 | 100.00% | 3 | 100.00% |
static inline void pinctrl_put(struct pinctrl *p)
{
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 11 | 100.00% | 2 | 100.00% |
| Total | 11 | 100.00% | 2 | 100.00% |
static inline struct pinctrl_state * __must_check pinctrl_lookup_state(
struct pinctrl *p,
const char *name)
{
return NULL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 13 | 56.52% | 3 | 75.00% |
stephen warren | stephen warren | 10 | 43.48% | 1 | 25.00% |
| Total | 23 | 100.00% | 4 | 100.00% |
static inline int pinctrl_select_state(struct pinctrl *p,
struct pinctrl_state *s)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 12 | 60.00% | 1 | 33.33% |
linus walleij | linus walleij | 8 | 40.00% | 2 | 66.67% |
| Total | 20 | 100.00% | 3 | 100.00% |
static inline struct pinctrl * __must_check devm_pinctrl_get(struct device *dev)
{
return NULL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 17 | 94.44% | 1 | 50.00% |
linus walleij | linus walleij | 1 | 5.56% | 1 | 50.00% |
| Total | 18 | 100.00% | 2 | 100.00% |
static inline void devm_pinctrl_put(struct pinctrl *p)
{
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 11 | 100.00% | 1 | 100.00% |
| Total | 11 | 100.00% | 1 | 100.00% |
static inline int pinctrl_pm_select_default_state(struct device *dev)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 15 | 100.00% | 1 | 100.00% |
| Total | 15 | 100.00% | 1 | 100.00% |
static inline int pinctrl_pm_select_sleep_state(struct device *dev)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 15 | 100.00% | 1 | 100.00% |
| Total | 15 | 100.00% | 1 | 100.00% |
static inline int pinctrl_pm_select_idle_state(struct device *dev)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 15 | 100.00% | 1 | 100.00% |
| Total | 15 | 100.00% | 1 | 100.00% |
#endif /* CONFIG_PINCTRL */
static inline struct pinctrl * __must_check pinctrl_get_select(
struct device *dev, const char *name)
{
struct pinctrl *p;
struct pinctrl_state *s;
int ret;
p = pinctrl_get(dev);
if (IS_ERR(p))
return p;
s = pinctrl_lookup_state(p, name);
if (IS_ERR(s)) {
pinctrl_put(p);
return ERR_CAST(s);
}
ret = pinctrl_select_state(p, s);
if (ret < 0) {
pinctrl_put(p);
return ERR_PTR(ret);
}
return p;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 109 | 99.09% | 1 | 50.00% |
fabian frederick | fabian frederick | 1 | 0.91% | 1 | 50.00% |
| Total | 110 | 100.00% | 2 | 100.00% |
static inline struct pinctrl * __must_check pinctrl_get_select_default(
struct device *dev)
{
return pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 23 | 100.00% | 1 | 100.00% |
| Total | 23 | 100.00% | 1 | 100.00% |
static inline struct pinctrl * __must_check devm_pinctrl_get_select(
struct device *dev, const char *name)
{
struct pinctrl *p;
struct pinctrl_state *s;
int ret;
p = devm_pinctrl_get(dev);
if (IS_ERR(p))
return p;
s = pinctrl_lookup_state(p, name);
if (IS_ERR(s)) {
devm_pinctrl_put(p);
return ERR_CAST(s);
}
ret = pinctrl_select_state(p, s);
if (ret < 0) {
devm_pinctrl_put(p);
return ERR_PTR(ret);
}
return p;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 109 | 99.09% | 1 | 50.00% |
uwe kleine-koenig | uwe kleine-koenig | 1 | 0.91% | 1 | 50.00% |
| Total | 110 | 100.00% | 2 | 100.00% |
static inline struct pinctrl * __must_check devm_pinctrl_get_select_default(
struct device *dev)
{
return devm_pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 23 | 100.00% | 1 | 100.00% |
| Total | 23 | 100.00% | 1 | 100.00% |
#endif /* __LINUX_PINCTRL_CONSUMER_H */
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 360 | 51.80% | 2 | 16.67% |
linus walleij | linus walleij | 329 | 47.34% | 6 | 50.00% |
richard genoud | richard genoud | 3 | 0.43% | 1 | 8.33% |
uwe kleine-koenig | uwe kleine-koenig | 1 | 0.14% | 1 | 8.33% |
david howells | david howells | 1 | 0.14% | 1 | 8.33% |
fabian frederick | fabian frederick | 1 | 0.14% | 1 | 8.33% |
| Total | 695 | 100.00% | 12 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.