Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294084
b: refs/heads/master
c: 3eedb43
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Warren authored and Linus Walleij committed Feb 29, 2012
1 parent d1d90e0 commit 3e610c5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 806d314325812fb8ffe7059bd84a23d334350c21
refs/heads/master: 3eedb4372354a70ce63c9f4ec294d2eba0d79d17
70 changes: 35 additions & 35 deletions trunk/drivers/pinctrl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,28 +889,6 @@ static int pinctrl_gpioranges_show(struct seq_file *s, void *what)
return 0;
}

static int pinctrl_maps_show(struct seq_file *s, void *what)
{
struct pinctrl_maps *maps_node;
int i;
struct pinctrl_map const *map;

seq_puts(s, "Pinctrl maps:\n");

mutex_lock(&pinctrl_maps_mutex);
for_each_maps(maps_node, i, map) {
seq_printf(s, "%s:\n", map->name);
seq_printf(s, " device: %s\n", map->dev_name);
seq_printf(s, " controlling device %s\n", map->ctrl_dev_name);
seq_printf(s, " function: %s\n", map->function);
seq_printf(s, " group: %s\n", map->group ? map->group :
"(default)");
}
mutex_unlock(&pinctrl_maps_mutex);

return 0;
}

static int pinmux_hogs_show(struct seq_file *s, void *what)
{
struct pinctrl_dev *pctldev = s->private;
Expand Down Expand Up @@ -947,6 +925,28 @@ static int pinctrl_devices_show(struct seq_file *s, void *what)
return 0;
}

static int pinctrl_maps_show(struct seq_file *s, void *what)
{
struct pinctrl_maps *maps_node;
int i;
struct pinctrl_map const *map;

seq_puts(s, "Pinctrl maps:\n");

mutex_lock(&pinctrl_maps_mutex);
for_each_maps(maps_node, i, map) {
seq_printf(s, "%s:\n", map->name);
seq_printf(s, " device: %s\n", map->dev_name);
seq_printf(s, " controlling device %s\n", map->ctrl_dev_name);
seq_printf(s, " function: %s\n", map->function);
seq_printf(s, " group: %s\n", map->group ? map->group :
"(default)");
}
mutex_unlock(&pinctrl_maps_mutex);

return 0;
}

static int pinctrl_show(struct seq_file *s, void *what)
{
struct pinctrl *p;
Expand Down Expand Up @@ -988,11 +988,6 @@ static int pinctrl_gpioranges_open(struct inode *inode, struct file *file)
return single_open(file, pinctrl_gpioranges_show, inode->i_private);
}

static int pinctrl_maps_open(struct inode *inode, struct file *file)
{
return single_open(file, pinctrl_maps_show, inode->i_private);
}

static int pinmux_hogs_open(struct inode *inode, struct file *file)
{
return single_open(file, pinmux_hogs_show, inode->i_private);
Expand All @@ -1003,6 +998,11 @@ static int pinctrl_devices_open(struct inode *inode, struct file *file)
return single_open(file, pinctrl_devices_show, NULL);
}

static int pinctrl_maps_open(struct inode *inode, struct file *file)
{
return single_open(file, pinctrl_maps_show, NULL);
}

static int pinctrl_open(struct inode *inode, struct file *file)
{
return single_open(file, pinctrl_show, NULL);
Expand All @@ -1029,22 +1029,22 @@ static const struct file_operations pinctrl_gpioranges_ops = {
.release = single_release,
};

static const struct file_operations pinctrl_maps_ops = {
.open = pinctrl_maps_open,
static const struct file_operations pinmux_hogs_ops = {
.open = pinmux_hogs_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};

static const struct file_operations pinmux_hogs_ops = {
.open = pinmux_hogs_open,
static const struct file_operations pinctrl_devices_ops = {
.open = pinctrl_devices_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};

static const struct file_operations pinctrl_devices_ops = {
.open = pinctrl_devices_open,
static const struct file_operations pinctrl_maps_ops = {
.open = pinctrl_maps_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
Expand Down Expand Up @@ -1078,8 +1078,6 @@ static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev)
device_root, pctldev, &pinctrl_groups_ops);
debugfs_create_file("gpio-ranges", S_IFREG | S_IRUGO,
device_root, pctldev, &pinctrl_gpioranges_ops);
debugfs_create_file("pinctrl-maps", S_IFREG | S_IRUGO,
device_root, pctldev, &pinctrl_maps_ops);
debugfs_create_file("pinmux-hogs", S_IFREG | S_IRUGO,
device_root, pctldev, &pinmux_hogs_ops);
pinmux_init_device_debugfs(device_root, pctldev);
Expand All @@ -1102,6 +1100,8 @@ static void pinctrl_init_debugfs(void)

debugfs_create_file("pinctrl-devices", S_IFREG | S_IRUGO,
debugfs_root, NULL, &pinctrl_devices_ops);
debugfs_create_file("pinctrl-maps", S_IFREG | S_IRUGO,
debugfs_root, NULL, &pinctrl_maps_ops);
debugfs_create_file("pinctrl-handles", S_IFREG | S_IRUGO,
debugfs_root, NULL, &pinctrl_ops);
}
Expand Down

0 comments on commit 3e610c5

Please sign in to comment.