diff options
author | Jim Cromie <jim.cromie@gmail.com> | 2006-06-27 05:54:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-27 20:32:43 -0400 |
commit | f31000e573da052b6b8bcc21faff520b4e2eda7a (patch) | |
tree | 670d5e6e00da615f70d99a950cfe7b8603edad26 /include/linux/nsc_gpio.h | |
parent | 58b087cda1e9e46c7061c2282f92bd8e1970bfe7 (diff) |
[PATCH] chardev: GPIO for SCx200 & PC-8736x: use dev_dbg in common module
Use of dev_dbg() and friends is considered good practice. dev_dbg() needs a
struct device *devp, but nsc_gpio is only a helper module, so it doesnt
have/need its own. To provide devp to the user-modules (scx200 & pc8736x
_gpio), we add it to the vtable, and set it during init.
Also squeeze nsc_gpio_dump()'s format a little.
[ 199.259879] pc8736x_gpio.0: io09: 0x0044 TS OD PUE EDGE LO DEBOUNCE
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/nsc_gpio.h')
-rw-r--r-- | include/linux/nsc_gpio.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/nsc_gpio.h b/include/linux/nsc_gpio.h index 27bf66f73868..135742cfada5 100644 --- a/include/linux/nsc_gpio.h +++ b/include/linux/nsc_gpio.h | |||
@@ -22,13 +22,14 @@ | |||
22 | struct nsc_gpio_ops { | 22 | struct nsc_gpio_ops { |
23 | struct module* owner; | 23 | struct module* owner; |
24 | u32 (*gpio_config) (unsigned iminor, u32 mask, u32 bits); | 24 | u32 (*gpio_config) (unsigned iminor, u32 mask, u32 bits); |
25 | void (*gpio_dump) (unsigned iminor); | 25 | void (*gpio_dump) (struct nsc_gpio_ops *amp, unsigned iminor); |
26 | int (*gpio_get) (unsigned iminor); | 26 | int (*gpio_get) (unsigned iminor); |
27 | void (*gpio_set) (unsigned iminor, int state); | 27 | void (*gpio_set) (unsigned iminor, int state); |
28 | void (*gpio_set_high)(unsigned iminor); | 28 | void (*gpio_set_high)(unsigned iminor); |
29 | void (*gpio_set_low) (unsigned iminor); | 29 | void (*gpio_set_low) (unsigned iminor); |
30 | void (*gpio_change) (unsigned iminor); | 30 | void (*gpio_change) (unsigned iminor); |
31 | int (*gpio_current) (unsigned iminor); | 31 | int (*gpio_current) (unsigned iminor); |
32 | struct device* dev; /* for dev_dbg() support, set in init */ | ||
32 | }; | 33 | }; |
33 | 34 | ||
34 | extern ssize_t nsc_gpio_write(struct file *file, const char __user *data, | 35 | extern ssize_t nsc_gpio_write(struct file *file, const char __user *data, |
@@ -36,3 +37,6 @@ extern ssize_t nsc_gpio_write(struct file *file, const char __user *data, | |||
36 | 37 | ||
37 | extern ssize_t nsc_gpio_read(struct file *file, char __user *buf, | 38 | extern ssize_t nsc_gpio_read(struct file *file, char __user *buf, |
38 | size_t len, loff_t *ppos); | 39 | size_t len, loff_t *ppos); |
40 | |||
41 | extern void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index); | ||
42 | |||