aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pc8736x_gpio.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-09-29[PATCH] drivers/char/pc8736x_gpio.c: remove unused static functionsAdrian Bunk1-10/+0
drivers/char/pc8736x_gpio.c:192: warning: #pc8736x_gpio_set_high# defined but not used drivers/char/pc8736x_gpio.c:197: warning: #pc8736x_gpio_set_low# defined but not used Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-31[PATCH] drivers/char/pc8736x_gpio.c: unexport a static structAdrian Bunk1-1/+0
A static struct mustn't be exported. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-14[PATCH] gpio: rename exported vtables to better match purposeJim Cromie1-7/+6
- rename EXPORTed gpio vtables from {scx200,pc8736x}_access to _gpio_ops new name is much closer to the vtable-name struct nsc_gpio_ops, should be clearer. Also rename the _fops vtable var to _fileops to better disambiguate it from the gpio vtable. 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>
2006-07-14[PATCH] gpio: drop vtable members .gpio_set_high .gpio_set_low gpio_set is enoughJim Cromie1-2/+0
drops gpio_set_high, gpio_set_low from the nsc_gpio_ops vtable. While we can't drop them from scx200_gpio (or can we?), we dont need them for new users of the exported vtable; gpio_set(1), gpio_set(0) work fine. 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>
2006-07-10[PATCH] pc8736x_gpio: fix re-modprobe errors: fix/finish cdev-initJim Cromie1-2/+15
- Switch from register_chrdev() to (register|alloc)_chrdev_region(). - use a cdev. This was intended for original patchset, but was overlooked. We use a single cdev for all pins (minor device-numbers), as gleaned from cs5535_gpio, and in contrast to whats currently done in scx200_gpio (which I'll fix soon) 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>
2006-07-10[PATCH] pc8736x_gpio: fix re-modprobe errors: undo region reservationJim Cromie1-6/+13
Fix module-init-func by repairing usage of platform_device_del/put in module-exit-func. IOW, it imitates Ingo's 'mishaps' patch, which fixed the module-init-func's undo handling. Also fixes lack of release_region to undo the earlier registration. Also starts to 'use a cdev' which was originally intended (its present in scx200_gpio). Code compiles and runs, exhibits a lesser error than previously. (re-register-chrdev fails) Since I had to add "include <linux/cdev.h>", I went ahead and made 2 tweaks that fell into diff-context-window: - remove include <linux/config.h> everyone's doing it - copyright updates - current date is 'wrong' 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>
2006-07-10[PATCH] pc8736x_gpio: fix re-modprobe errors: define and use constantsJim Cromie1-5/+5
add constant defines - preparatory patch - adds #define CONSTs for max-pin, gpio-addr-range (for reserving region) - fix wrong max-pin check in gpio_open() - add 'Winbond' to module description. NSC sold the product, Winbond has supported us / lm-sensors 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>
2006-07-03[PATCH] make more file_operation structs staticArjan van de Ven1-1/+1
Mark the static struct file_operations in drivers/char as const. Making them const prevents accidental bugs, and moves them to the .rodata section so that they no longer do any false sharing; in addition with the proper debug option they are then protected against corruption.. [akpm@osdl.org: build fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30[PATCH] fix platform_device_put/del mishapsIngo Molnar1-2/+3
This fixes drivers/char/pc8736x_gpio.c and drivers/char/scx200_gpio.c to use the platform_device_del/put ops correctly. Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27[PATCH] gpio-patchset-fixups: include linux/io.hJim Cromie1-1/+1
Hmm. Im somewhat ambivalent about this patch, since with it, driver wont build for vanilla 17 or older. Its also only 1/2 of your suggestion - when I tried it, I was building against vanilla 17, and asm/uaccess.h cause compilation failure. Looking back, Im perplexed as to why linux/io.h didnt cause same failure ?!? use linux/io.h rather than asm/io.h 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>
2006-06-27[PATCH] chardev: GPIO for SCx200 & PC-8736x: replace spinlocks w mutexesJim Cromie1-4/+4
Replace spinlocks guarding gpio config ops with mutexes. This is a me-too patch, and is justifiable insofar as mutexes have stricter semantics and better debugging support, so are preferred where they are applicable. 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>
2006-06-27[PATCH] chardev: GPIO for SCx200 & PC-8736x: fix gpio_current, use shadow regsJim Cromie1-4/+23
Add a working gpio_current() to pc8736x_gpio.c (the previous implementation just threw a dev_warn), and fix gpio_change() to use gpio_current() rather than the incorrect (and temporary) gpio_get(). Initialize shadow-regs so this all works. 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>
2006-06-27[PATCH] chardev: GPIO for SCx200 & PC-8736x: use dev_dbg in common moduleJim Cromie1-2/+1
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>
2006-06-27[PATCH] chardev: GPIO for SCx200 & PC-8736x: add platform_device for use w dev_dbgJim Cromie1-38/+64
Adds platform-device to (just introduced) driver, and uses it to replace many printks with dev_dbg() etc. This could trivially be merged into previous patch, but this way matches better with the corresponding patch that does the same change to scx200_gpio. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27[PATCH] chardev: GPIO for SCx200 & PC-8736x: add new pc8736x_gpio moduleJim Cromie1-0/+296
Add the brand new pc8736x_gpio driver. This is mostly based upon scx200_gpio.c, but the platform_dev is treated separately, since its fairly big too. 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>