Release 4.12 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 int pinctrl_gpio_set_config(unsigned gpio, unsigned long config);
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 | 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 | 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 | 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 | 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 | 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 | 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 | 13 | 100.00% | 2 | 100.00% |
Total | 13 | 100.00% | 2 | 100.00% |
static inline int pinctrl_gpio_set_config(unsigned gpio, unsigned long config)
{
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Mika Westerberg | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
static inline struct pinctrl * __must_check pinctrl_get(struct device *dev)
{
return NULL;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
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 | 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 | 13 | 56.52% | 3 | 75.00% |
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 | 12 | 60.00% | 1 | 33.33% |
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 | 17 | 94.44% | 1 | 50.00% |
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 | 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 | 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 | 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 | 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 | 109 | 99.09% | 1 | 50.00% |
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 | 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 | 109 | 99.09% | 1 | 50.00% |
Uwe Kleine-König | 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 | 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 | 360 | 49.72% | 2 | 15.38% |
Linus Walleij | 329 | 45.44% | 6 | 46.15% |
Mika Westerberg | 29 | 4.01% | 1 | 7.69% |
Richard Genoud | 3 | 0.41% | 1 | 7.69% |
Fabian Frederick | 1 | 0.14% | 1 | 7.69% |
Uwe Kleine-König | 1 | 0.14% | 1 | 7.69% |
David Howells | 1 | 0.14% | 1 | 7.69% |
Total | 724 | 100.00% | 13 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.