Update of /cvsroot/gc-linux/linux/drivers/gpio
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv401/drivers/gpio
Added Files:
gpiolib.c
Log Message:
Add vanilla drivers/gpio/gpiolib.c, include/asm-generic/gpio.h and include/linux/gpio.h.
--- NEW FILE: gpiolib.c ---
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/irq.h>
#include <linux/spinlock.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/gpio.h>
/* Optional implementation infrastructure for GPIO interfaces.
*
* Platforms may want to use this if they tend to use very many GPIOs
* that aren't part of a System-On-Chip core; or across I2C/SPI/etc.
*
* When kernel footprint or instruction count is an issue, simpler
* implementations may be preferred. The GPIO programming interface
* allows for inlining speed-critical get/set operations for common
[...1215 lines suppressed...]
return single_open(file, gpiolib_show, NULL);
}
static struct file_operations gpiolib_operations = {
.open = gpiolib_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static int __init gpiolib_debugfs_init(void)
{
/* /sys/kernel/debug/gpio */
(void) debugfs_create_file("gpio", S_IFREG | S_IRUGO,
NULL, NULL, &gpiolib_operations);
return 0;
}
subsys_initcall(gpiolib_debugfs_init);
#endif /* DEBUG_FS */
|