GPIO SUPPORT FOR SCx200 & PC8736x
This patch-set reworks the 2.4 vintage scx200_gpio driver for modern
2.6, and refactors GPIO support to reuse it in a new driver for the
GPIO on PC-8736x chips.
11/19. patch.nscgpio-shell
Add empty shell, will contain common gpio support routines.
Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
diffstat patch.nscgpio-shell
Makefile | 2 +-
nsc_gpio.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 1 deletion(-)
diff -ruNp -X dontdiff -X exclude-diffs k16r-10/drivers/char/Makefile
k16r-11/drivers/char/Makefile
--- k16r-10/drivers/char/Makefile 2006-03-19 22:53:29.000000000 -0700
+++ k16r-11/drivers/char/Makefile 2006-05-28 12:21:46.000000000 -0600
@@ -80,7 +80,7 @@ obj-$(CONFIG_COBALT_LCD) += lcd.o
obj-$(CONFIG_PPDEV) += ppdev.o
obj-$(CONFIG_NWBUTTON) += nwbutton.o
obj-$(CONFIG_NWFLASH) += nwflash.o
-obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o
+obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o nsc_gpio.o
obj-$(CONFIG_CS5535_GPIO) += cs5535_gpio.o
obj-$(CONFIG_GPIO_VR41XX) += vr41xx_giu.o
obj-$(CONFIG_TANBAC_TB0219) += tb0219.o
diff -ruNp -X dontdiff -X exclude-diffs k16r-10/drivers/char/nsc_gpio.c
k16r-11/drivers/char/nsc_gpio.c
--- k16r-10/drivers/char/nsc_gpio.c 1969-12-31 17:00:00.000000000 -0700
+++ k16r-11/drivers/char/nsc_gpio.c 2006-05-28 12:21:46.000000000 -0600
@@ -0,0 +1,45 @@
+/* linux/drivers/char/nsc_gpio.c
+
+ National Semiconductor common GPIO device-file/VFS methods.
+ Allows a user space process to control the GPIO pins.
+
+ Copyright (c) 2001,2002 Christer Weinigel <wingel@xxxxxxxxxxxxxxx>
+ Copyright (c) 2005 Jim Cromie <jim.cromie@xxxxxxxxx>
+*/
+
+#include <linux/config.h>
+#include <linux/fs.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/nsc_gpio.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+
+#define NAME "nsc_gpio"
+
+MODULE_AUTHOR("Jim Cromie <jim.cromie@xxxxxxxxx>");
+MODULE_DESCRIPTION("NatSemi GPIO Common Methods");
+MODULE_LICENSE("GPL");
+
+static int __init nsc_gpio_init(void)
+{
+ printk(KERN_DEBUG NAME " initializing\n");
+ return 0;
+}
+
+static void __exit nsc_gpio_cleanup(void)
+{
+ printk(KERN_DEBUG NAME " cleanup\n");
+}
+
+/* prepare for
+ common routines for both scx200_gpio and pc87360_gpio
+EXPORT_SYMBOL(scx200_gpio_write);
+EXPORT_SYMBOL(scx200_gpio_read);
+EXPORT_SYMBOL(scx200_gpio_release);
+*/
+
+module_init(nsc_gpio_init);
+module_exit(nsc_gpio_cleanup);
|