Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30774
b: refs/heads/master
c: 9550a33
h: refs/heads/master
v: v3
  • Loading branch information
Jim Cromie authored and Linus Torvalds committed Jun 28, 2006
1 parent 2edb7de commit 203d71f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 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: d424aa8744b7b7db1d32476ae6c8015d10eebe1c
refs/heads/master: 9550a339e1ab1709dd53d92a1b76eecae2df9f3c
3 changes: 1 addition & 2 deletions trunk/arch/i386/kernel/scx200.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ u32 scx200_gpio_configure(unsigned index, u32 mask, u32 bits)
return config;
}

#if 0
void scx200_gpio_dump(unsigned index)
{
u32 config = scx200_gpio_configure(index, ~0, 0);
Expand All @@ -120,7 +119,6 @@ void scx200_gpio_dump(unsigned index)
(config & 32) ? "HI" : "LO", /* trigger on rising/falling edge */
(config & 64) ? "DEBOUNCE" : ""); /* debounce */
}
#endif /* 0 */

static int __init scx200_init(void)
{
Expand All @@ -141,4 +139,5 @@ module_exit(scx200_cleanup);
EXPORT_SYMBOL(scx200_gpio_base);
EXPORT_SYMBOL(scx200_gpio_shadow);
EXPORT_SYMBOL(scx200_gpio_configure);
EXPORT_SYMBOL(scx200_gpio_dump);
EXPORT_SYMBOL(scx200_cb_base);
16 changes: 16 additions & 0 deletions trunk/drivers/char/scx200_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ static ssize_t scx200_gpio_write(struct file *file, const char __user *data,
{
unsigned m = iminor(file->f_dentry->d_inode);
size_t i;
int err = 0;

for (i = 0; i < len; ++i) {
char c;
Expand Down Expand Up @@ -77,8 +78,23 @@ static ssize_t scx200_gpio_write(struct file *file, const char __user *data,
printk(KERN_INFO NAME ": GPIO%d pull up disabled\n", m);
scx200_gpio_configure(m, ~4, 0);
break;

case 'v':
/* View Current pin settings */
scx200_gpio_dump(m);
break;
case '\n':
/* end of settings string, do nothing */
break;
default:
printk(KERN_ERR NAME
": GPIO-%2d bad setting: chr<0x%2x>\n", m,
(int)c);
err++;
}
}
if (err)
return -EINVAL; /* full string handled, report error */

return len;
}
Expand Down

0 comments on commit 203d71f

Please sign in to comment.