Release 4.7 drivers/pinctrl/pinmux.c
/*
* Core driver for the pin muxing portions of the pin control subsystem
*
* Copyright (C) 2011-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>
*
* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
*
* License terms: GNU General Public License (GPL) version 2
*/
#define pr_fmt(fmt) "pinmux core: " fmt
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/radix-tree.h>
#include <linux/err.h>
#include <linux/list.h>
#include <linux/string.h>
#include <linux/sysfs.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/pinctrl/machine.h>
#include <linux/pinctrl/pinmux.h>
#include "core.h"
#include "pinmux.h"
int pinmux_check_ops(struct pinctrl_dev *pctldev)
{
const struct pinmux_ops *ops = pctldev->desc->pmxops;
unsigned nfuncs;
unsigned selector = 0;
/* Check that we implement required operations */
if (!ops ||
!ops->get_functions_count ||
!ops->get_function_name ||
!ops->get_function_groups ||
!ops->set_mux) {
dev_err(pctldev->dev, "pinmux ops lacks necessary functions\n");
return -EINVAL;
}
/* Check that all functions registered have names */
nfuncs = ops->get_functions_count(pctldev);
while (selector < nfuncs) {
const char *fname = ops->get_function_name(pctldev,
selector);
if (!fname) {
dev_err(pctldev->dev, "pinmux ops has no name for function%u\n",
selector);
return -EINVAL;
}
selector++;
}
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 96 | 73.28% | 1 | 20.00% |
dong aisheng | dong aisheng | 17 | 12.98% | 1 | 20.00% |
john crispin | john crispin | 11 | 8.40% | 1 | 20.00% |
viresh kumar | viresh kumar | 6 | 4.58% | 1 | 20.00% |
linus walleij | linus walleij | 1 | 0.76% | 1 | 20.00% |
| Total | 131 | 100.00% | 5 | 100.00% |
int pinmux_validate_map(struct pinctrl_map const *map, int i)
{
if (!map->data.mux.function) {
pr_err("failed to register map %s (%d): no function given\n",
map->name, i);
return -EINVAL;
}
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 45 | 100.00% | 1 | 100.00% |
| Total | 45 | 100.00% | 1 | 100.00% |
/**
* pin_request() - request a single pin to be muxed in, typically for GPIO
* @pin: the pin number in the global pin space
* @owner: a representation of the owner of this pin; typically the device
* name that controls its mux function, or the requested GPIO name
* @gpio_range: the range matching the GPIO pin if this is a request for a
* single GPIO pin
*/
static int pin_request(struct pinctrl_dev *pctldev,
int pin, const char *owner,
struct pinctrl_gpio_range *gpio_range)
{
struct pin_desc *desc;
const struct pinmux_ops *ops = pctldev->desc->pmxops;
int status = -EINVAL;
desc = pin_desc_get(pctldev, pin);
if (desc == NULL) {
dev_err(pctldev->dev,
"pin %d is not registered so it cannot be requested\n",
pin);
goto out;
}
dev_dbg(pctldev->dev, "request pin %d (%s) for %s\n",
pin, desc->name, owner);
if (gpio_range) {
/* There's no need to support multiple GPIO requests */
if (desc->gpio_owner) {
dev_err(pctldev->dev,
"pin %s already requested by %s; cannot claim for %s\n",
desc->name, desc->gpio_owner, owner);
goto out;
}
if (ops->strict && desc->mux_usecount &&
strcmp(desc->mux_owner, owner)) {
dev_err(pctldev->dev,
"pin %s already requested by %s; cannot claim for %s\n",
desc->name, desc->mux_owner, owner);
goto out;
}
desc->gpio_owner = owner;
} else {
if (desc->mux_usecount && strcmp(desc->mux_owner, owner)) {
dev_err(pctldev->dev,
"pin %s already requested by %s; cannot claim for %s\n",
desc->name, desc->mux_owner, owner);
goto out;
}
if (ops->strict && desc->gpio_owner) {
dev_err(pctldev->dev,
"pin %s already requested by %s; cannot claim for %s\n",
desc->name, desc->gpio_owner, owner);
goto out;
}
desc->mux_usecount++;
if (desc->mux_usecount > 1)
return 0;
desc->mux_owner = owner;
}
/* Let each pin increase references to this module */
if (!try_module_get(pctldev->owner)) {
dev_err(pctldev->dev,
"could not increase module refcount for pin %d\n",
pin);
status = -EINVAL;
goto out_free_pin;
}
/*
* If there is no kind of request function for the pin we just assume
* we got it by default and proceed.
*/
if (gpio_range && ops->gpio_request_enable)
/* This requests and enables a single GPIO pin */
status = ops->gpio_request_enable(pctldev, gpio_range, pin);
else if (ops->request)
status = ops->request(pctldev, pin);
else
status = 0;
if (status) {
dev_err(pctldev->dev, "request() failed for pin %d\n", pin);
module_put(pctldev->owner);
}
out_free_pin:
if (status) {
if (gpio_range) {
desc->gpio_owner = NULL;
} else {
desc->mux_usecount--;
if (!desc->mux_usecount)
desc->mux_owner = NULL;
}
}
out:
if (status)
dev_err(pctldev->dev, "pin-%d (%s) status %d\n",
pin, owner, status);
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 209 | 46.86% | 2 | 18.18% |
stephen warren | stephen warren | 133 | 29.82% | 6 | 54.55% |
sonic zhang | sonic zhang | 75 | 16.82% | 1 | 9.09% |
dong aisheng | dong aisheng | 17 | 3.81% | 1 | 9.09% |
marek belisko | marek belisko | 12 | 2.69% | 1 | 9.09% |
| Total | 446 | 100.00% | 11 | 100.00% |
/**
* pin_free() - release a single muxed in pin so something else can be muxed
* @pctldev: pin controller device handling this pin
* @pin: the pin to free
* @gpio_range: the range matching the GPIO pin if this is a request for a
* single GPIO pin
*
* This function returns a pointer to the previous owner. This is used
* for callers that dynamically allocate an owner name so it can be freed
* once the pin is free. This is done for GPIO request functions.
*/
static const char *pin_free(struct pinctrl_dev *pctldev, int pin,
struct pinctrl_gpio_range *gpio_range)
{
const struct pinmux_ops *ops = pctldev->desc->pmxops;
struct pin_desc *desc;
const char *owner;
desc = pin_desc_get(pctldev, pin);
if (desc == NULL) {
dev_err(pctldev->dev,
"pin is not registered so it cannot be freed\n");
return NULL;
}
if (!gpio_range) {
/*
* A pin should not be freed more times than allocated.
*/
if (WARN_ON(!desc->mux_usecount))
return NULL;
desc->mux_usecount--;
if (desc->mux_usecount)
return NULL;
}
/*
* If there is no kind of request function for the pin we just assume
* we got it by default and proceed.
*/
if (gpio_range && ops->gpio_disable_free)
ops->gpio_disable_free(pctldev, gpio_range, pin);
else if (ops->free)
ops->free(pctldev, pin);
if (gpio_range) {
owner = desc->gpio_owner;
desc->gpio_owner = NULL;
} else {
owner = desc->mux_owner;
desc->mux_owner = NULL;
desc->mux_setting = NULL;
}
module_put(pctldev->owner);
return owner;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 93 | 48.44% | 6 | 75.00% |
linus walleij | linus walleij | 85 | 44.27% | 1 | 12.50% |
richard genoud | richard genoud | 14 | 7.29% | 1 | 12.50% |
| Total | 192 | 100.00% | 8 | 100.00% |
/**
* pinmux_request_gpio() - request pinmuxing for a GPIO pin
* @pctldev: pin controller device affected
* @pin: the pin to mux in for GPIO
* @range: the applicable GPIO range
*/
int pinmux_request_gpio(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range,
unsigned pin, unsigned gpio)
{
const char *owner;
int ret;
/* Conjure some name stating what chip and pin this is taken by */
owner = kasprintf(GFP_KERNEL, "%s:%d", range->name, gpio);
if (!owner)
return -EINVAL;
ret = pin_request(pctldev, pin, owner, range);
if (ret < 0)
kfree(owner);
return ret;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 47 | 58.02% | 2 | 40.00% |
stephen warren | stephen warren | 30 | 37.04% | 2 | 40.00% |
thomas petazzoni | thomas petazzoni | 4 | 4.94% | 1 | 20.00% |
| Total | 81 | 100.00% | 5 | 100.00% |
/**
* pinmux_free_gpio() - release a pin from GPIO muxing
* @pctldev: the pin controller device for the pin
* @pin: the affected currently GPIO-muxed in pin
* @range: applicable GPIO range
*/
void pinmux_free_gpio(struct pinctrl_dev *pctldev, unsigned pin,
struct pinctrl_gpio_range *range)
{
const char *owner;
owner = pin_free(pctldev, pin, range);
kfree(owner);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 25 | 64.10% | 2 | 40.00% |
stephen warren | stephen warren | 14 | 35.90% | 3 | 60.00% |
| Total | 39 | 100.00% | 5 | 100.00% |
/**
* pinmux_gpio_direction() - set the direction of a single muxed-in GPIO pin
* @pctldev: the pin controller handling this pin
* @range: applicable GPIO range
* @pin: the affected GPIO pin in this controller
* @input: true if we set the pin as input, false for output
*/
int pinmux_gpio_direction(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range,
unsigned pin, bool input)
{
const struct pinmux_ops *ops;
int ret;
ops = pctldev->desc->pmxops;
if (ops->gpio_set_direction)
ret = ops->gpio_set_direction(pctldev, range, pin, input);
else
ret = 0;
return ret;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 67 | 100.00% | 2 | 100.00% |
| Total | 67 | 100.00% | 2 | 100.00% |
static int pinmux_func_name_to_selector(struct pinctrl_dev *pctldev,
const char *function)
{
const struct pinmux_ops *ops = pctldev->desc->pmxops;
unsigned nfuncs = ops->get_functions_count(pctldev);
unsigned selector = 0;
/* See if this pctldev has this function */
while (selector < nfuncs) {
const char *fname = ops->get_function_name(pctldev, selector);
if (!strcmp(function, fname))
return selector;
selector++;
}
dev_err(pctldev->dev, "function '%s' not supported\n", function);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 40 | 41.24% | 2 | 28.57% |
linus walleij | linus walleij | 40 | 41.24% | 3 | 42.86% |
viresh kumar | viresh kumar | 12 | 12.37% | 1 | 14.29% |
masahiro yamada | masahiro yamada | 5 | 5.15% | 1 | 14.29% |
| Total | 97 | 100.00% | 7 | 100.00% |
int pinmux_map_to_setting(struct pinctrl_map const *map,
struct pinctrl_setting *setting)
{
struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinmux_ops *pmxops = pctldev->desc->pmxops;
char const * const *groups;
unsigned num_groups;
int ret;
const char *group;
if (!pmxops) {
dev_err(pctldev->dev, "does not support mux function\n");
return -EINVAL;
}
ret = pinmux_func_name_to_selector(pctldev, map->data.mux.function);
if (ret < 0) {
dev_err(pctldev->dev, "invalid function %s in map table\n",
map->data.mux.function);
return ret;
}
setting->data.mux.func = ret;
ret = pmxops->get_function_groups(pctldev, setting->data.mux.func,
&groups, &num_groups);
if (ret < 0) {
dev_err(pctldev->dev, "can't query groups for function %s\n",
map->data.mux.function);
return ret;
}
if (!num_groups) {
dev_err(pctldev->dev,
"function %s can't be selected on any group\n",
map->data.mux.function);
return -EINVAL;
}
if (map->data.mux.group) {
group = map->data.mux.group;
ret = match_string(groups, num_groups, group);
if (ret < 0) {
dev_err(pctldev->dev,
"invalid group \"%s\" for function \"%s\"\n",
group, map->data.mux.function);
return ret;
}
} else {
group = groups[0];
}
ret = pinctrl_get_group_selector(pctldev, group);
if (ret < 0) {
dev_err(pctldev->dev, "invalid group %s in map table\n",
map->data.mux.group);
return ret;
}
setting->data.mux.group = ret;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
john crispin | john crispin | 111 | 33.64% | 2 | 25.00% |
stephen warren | stephen warren | 109 | 33.03% | 2 | 25.00% |
linus walleij | linus walleij | 80 | 24.24% | 2 | 25.00% |
dong aisheng | dong aisheng | 20 | 6.06% | 1 | 12.50% |
andy shevchenko | andy shevchenko | 10 | 3.03% | 1 | 12.50% |
| Total | 330 | 100.00% | 8 | 100.00% |
void pinmux_free_setting(struct pinctrl_setting const *setting)
{
/* This function is currently unused */
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 8 | 66.67% | 2 | 66.67% |
stephen warren | stephen warren | 4 | 33.33% | 1 | 33.33% |
| Total | 12 | 100.00% | 3 | 100.00% |
int pinmux_enable_setting(struct pinctrl_setting const *setting)
{
struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
const struct pinmux_ops *ops = pctldev->desc->pmxops;
int ret = 0;
const unsigned *pins = NULL;
unsigned num_pins = 0;
int i;
struct pin_desc *desc;
if (pctlops->get_group_pins)
ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
&pins, &num_pins);
if (ret) {
const char *gname;
/* errors only affect debug data, so just warn */
gname = pctlops->get_group_name(pctldev,
setting->data.mux.group);
dev_warn(pctldev->dev,
"could not get pins for group %s\n",
gname);
num_pins = 0;
}
/* Try to allocate all pins in this group, one by one */
for (i = 0; i < num_pins; i++) {
ret = pin_request(pctldev, pins[i], setting->dev_name, NULL);
if (ret) {
const char *gname;
const char *pname;
desc = pin_desc_get(pctldev, pins[i]);
pname = desc ? desc->name : "non-existing";
gname = pctlops->get_group_name(pctldev,
setting->data.mux.group);
dev_err(pctldev->dev,
"could not request pin %d (%s) from group %s "
" on device %s\n",
pins[i], pname, gname,
pinctrl_dev_get_name(pctldev));
goto err_pin_request;
}
}
/* Now that we have acquired the pins, encode the mux setting */
for (i = 0; i < num_pins; i++) {
desc = pin_desc_get(pctldev, pins[i]);
if (desc == NULL) {
dev_warn(pctldev->dev,
"could not get pin desc for pin %d\n",
pins[i]);
continue;
}
desc->mux_setting = &(setting->data.mux);
}
ret = ops->set_mux(pctldev, setting->data.mux.func,
setting->data.mux.group);
if (ret)
goto err_set_mux;
return 0;
err_set_mux:
for (i = 0; i < num_pins; i++) {
desc = pin_desc_get(pctldev, pins[i]);
if (desc)
desc->mux_setting = NULL;
}
err_pin_request:
/* On error release all taken pins */
while (--i >= 0)
pin_free(pctldev, pins[i], NULL);
return ret;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 173 | 41.09% | 3 | 30.00% |
linus walleij | linus walleij | 159 | 37.77% | 5 | 50.00% |
axel lin | axel lin | 77 | 18.29% | 1 | 10.00% |
antoine tenart | antoine tenart | 12 | 2.85% | 1 | 10.00% |
| Total | 421 | 100.00% | 10 | 100.00% |
void pinmux_disable_setting(struct pinctrl_setting const *setting)
{
struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
int ret = 0;
const unsigned *pins = NULL;
unsigned num_pins = 0;
int i;
struct pin_desc *desc;
if (pctlops->get_group_pins)
ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
&pins, &num_pins);
if (ret) {
const char *gname;
/* errors only affect debug data, so just warn */
gname = pctlops->get_group_name(pctldev,
setting->data.mux.group);
dev_warn(pctldev->dev,
"could not get pins for group %s\n",
gname);
num_pins = 0;
}
/* Flag the descs that no setting is active */
for (i = 0; i < num_pins; i++) {
desc = pin_desc_get(pctldev, pins[i]);
if (desc == NULL) {
dev_warn(pctldev->dev,
"could not get pin desc for pin %d\n",
pins[i]);
continue;
}
if (desc->mux_setting == &(setting->data.mux)) {
desc->mux_setting = NULL;
/* And release the pin */
pin_free(pctldev, pins[i], NULL);
} else {
const char *gname;
gname = pctlops->get_group_name(pctldev,
setting->data.mux.group);
dev_warn(pctldev->dev,
"not freeing pin %d (%s) as part of "
"deactivating group %s - it is already "
"used for some other setting",
pins[i], desc->name, gname);
}
}
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 135 | 51.14% | 2 | 22.22% |
linus walleij | linus walleij | 95 | 35.98% | 4 | 44.44% |
sonic zhang | sonic zhang | 19 | 7.20% | 1 | 11.11% |
antoine tenart | antoine tenart | 12 | 4.55% | 1 | 11.11% |
michael opdenacker | michael opdenacker | 3 | 1.14% | 1 | 11.11% |
| Total | 264 | 100.00% | 9 | 100.00% |
#ifdef CONFIG_DEBUG_FS
/* Called from pincontrol core */
static int pinmux_functions_show(struct seq_file *s, void *what)
{
struct pinctrl_dev *pctldev = s->private;
const struct pinmux_ops *pmxops = pctldev->desc->pmxops;
unsigned nfuncs;
unsigned func_selector = 0;
if (!pmxops)
return 0;
mutex_lock(&pctldev->mutex);
nfuncs = pmxops->get_functions_count(pctldev);
while (func_selector < nfuncs) {
const char *func = pmxops->get_function_name(pctldev,
func_selector);
const char * const *groups;
unsigned num_groups;
int ret;
int i;
ret = pmxops->get_function_groups(pctldev, func_selector,
&groups, &num_groups);
if (ret) {
seq_printf(s, "function %s: COULD NOT GET GROUPS\n",
func);
func_selector++;
continue;
}
seq_printf(s, "function: %s, groups = [ ", func);
for (i = 0; i < num_groups; i++)
seq_printf(s, "%s ", groups[i]);
seq_puts(s, "]\n");
func_selector++;
}
mutex_unlock(&pctldev->mutex);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 154 | 77.78% | 1 | 16.67% |
dong aisheng | dong aisheng | 17 | 8.59% | 1 | 16.67% |
stephen warren | stephen warren | 10 | 5.05% | 1 | 16.67% |
ludovic desroches | ludovic desroches | 6 | 3.03% | 1 | 16.67% |
patrice chotard | patrice chotard | 6 | 3.03% | 1 | 16.67% |
viresh kumar | viresh kumar | 5 | 2.53% | 1 | 16.67% |
| Total | 198 | 100.00% | 6 | 100.00% |
static int pinmux_pins_show(struct seq_file *s, void *what)
{
struct pinctrl_dev *pctldev = s->private;
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
const struct pinmux_ops *pmxops = pctldev->desc->pmxops;
unsigned i, pin;
if (!pmxops)
return 0;
seq_puts(s, "Pinmux settings per pin\n");
if (pmxops->strict)
seq_puts(s,
"Format: pin (name): mux_owner|gpio_owner (strict) hog?\n");
else
seq_puts(s,
"Format: pin (name): mux_owner gpio_owner hog?\n");
mutex_lock(&pctldev->mutex);
/* The pin number can be retrived from the pin controller descriptor */
for (i = 0; i < pctldev->desc->npins; i++) {
struct pin_desc *desc;
bool is_hog = false;
pin = pctldev->desc->pins[i].number;
desc = pin_desc_get(pctldev, pin);
/* Skip if we cannot search the pin */
if (desc == NULL)
continue;
if (desc->mux_owner &&
!strcmp(desc->mux_owner, pinctrl_dev_get_name(pctldev)))
is_hog = true;
if (pmxops->strict) {
if (desc->mux_owner)
seq_printf(s, "pin %d (%s): device %s%s",
pin,
desc->name ? desc->name : "unnamed",
desc->mux_owner,
is_hog ? " (HOG)" : "");
else if (desc->gpio_owner)
seq_printf(s, "pin %d (%s): GPIO %s",
pin,
desc->name ? desc->name : "unnamed",
desc->gpio_owner);
else
seq_printf(s, "pin %d (%s): UNCLAIMED",
pin,
desc->name ? desc->name : "unnamed");
} else {
/* For non-strict controllers */
seq_printf(s, "pin %d (%s): %s %s%s", pin,
desc->name ? desc->name : "unnamed",
desc->mux_owner ? desc->mux_owner
: "(MUX UNCLAIMED)",
desc->gpio_owner ? desc->gpio_owner
: "(GPIO UNCLAIMED)",
is_hog ? " (HOG)" : "");
}
/* If mux: print function+group claiming the pin */
if (desc->mux_setting)
seq_printf(s, " function %s group %s\n",
pmxops->get_function_name(pctldev,
desc->mux_setting->func),
pctlops->get_group_name(pctldev,
desc->mux_setting->group));
else
seq_printf(s, "\n");
}
mutex_unlock(&pctldev->mutex);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 247 | 64.83% | 3 | 33.33% |
stephen warren | stephen warren | 98 | 25.72% | 3 | 33.33% |
chanho park | chanho park | 22 | 5.77% | 1 | 11.11% |
dong aisheng | dong aisheng | 8 | 2.10% | 1 | 11.11% |
patrice chotard | patrice chotard | 6 | 1.57% | 1 | 11.11% |
| Total | 381 | 100.00% | 9 | 100.00% |
void pinmux_show_map(struct seq_file *s, struct pinctrl_map const *map)
{
seq_printf(s, "group %s\nfunction %s\n",
map->data.mux.group ? map->data.mux.group : "(default)",
map->data.mux.function);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
stephen warren | stephen warren | 49 | 100.00% | 1 | 100.00% |
| Total | 49 | 100.00% | 1 | 100.00% |
void pinmux_show_setting(struct seq_file *s,
struct pinctrl_setting const *setting)
{
struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinmux_ops *pmxops = pctldev->desc->pmxops;
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
seq_printf(s, "group: %s (%u) function: %s (%u)\n",
pctlops->get_group_name(pctldev, setting->data.mux.group),
setting->data.mux.group,
pmxops->get_function_name(pctldev, setting->data.mux.func),
setting->data.mux.func);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 52 | 50.98% | 2 | 40.00% |
stephen warren | stephen warren | 50 | 49.02% | 3 | 60.00% |
| Total | 102 | 100.00% | 5 | 100.00% |
static int pinmux_functions_open(struct inode *inode, struct file *file)
{
return single_open(file, pinmux_functions_show, inode->i_private);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 28 | 100.00% | 1 | 100.00% |
| Total | 28 | 100.00% | 1 | 100.00% |
static int pinmux_pins_open(struct inode *inode, struct file *file)
{
return single_open(file, pinmux_pins_show, inode->i_private);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 28 | 100.00% | 1 | 100.00% |
| Total | 28 | 100.00% | 1 | 100.00% |
static const struct file_operations pinmux_functions_ops = {
.open = pinmux_functions_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static const struct file_operations pinmux_pins_ops = {
.open = pinmux_pins_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
void pinmux_init_device_debugfs(struct dentry *devroot,
struct pinctrl_dev *pctldev)
{
debugfs_create_file("pinmux-functions", S_IFREG | S_IRUGO,
devroot, pctldev, &pinmux_functions_ops);
debugfs_create_file("pinmux-pins", S_IFREG | S_IRUGO,
devroot, pctldev, &pinmux_pins_ops);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 47 | 100.00% | 1 | 100.00% |
| Total | 47 | 100.00% | 1 | 100.00% |
#endif /* CONFIG_DEBUG_FS */
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
linus walleij | linus walleij | 1493 | 48.44% | 10 | 24.39% |
stephen warren | stephen warren | 1082 | 35.11% | 12 | 29.27% |
john crispin | john crispin | 122 | 3.96% | 2 | 4.88% |
sonic zhang | sonic zhang | 94 | 3.05% | 2 | 4.88% |
dong aisheng | dong aisheng | 79 | 2.56% | 3 | 7.32% |
axel lin | axel lin | 77 | 2.50% | 1 | 2.44% |
antoine tenart | antoine tenart | 24 | 0.78% | 1 | 2.44% |
viresh kumar | viresh kumar | 23 | 0.75% | 1 | 2.44% |
chanho park | chanho park | 22 | 0.71% | 1 | 2.44% |
richard genoud | richard genoud | 14 | 0.45% | 1 | 2.44% |
marek belisko | marek belisko | 12 | 0.39% | 1 | 2.44% |
patrice chotard | patrice chotard | 12 | 0.39% | 1 | 2.44% |
andy shevchenko | andy shevchenko | 10 | 0.32% | 1 | 2.44% |
ludovic desroches | ludovic desroches | 6 | 0.19% | 1 | 2.44% |
masahiro yamada | masahiro yamada | 5 | 0.16% | 1 | 2.44% |
thomas petazzoni | thomas petazzoni | 4 | 0.13% | 1 | 2.44% |
michael opdenacker | michael opdenacker | 3 | 0.10% | 1 | 2.44% |
| Total | 3082 | 100.00% | 41 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.