2 * (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 * Torsten Frenzel <frenzel@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
10 #include <linux/module.h>
11 #include <linux/init.h>
12 #include <linux/serio.h>
13 #include <linux/errno.h>
14 #include <linux/interrupt.h>
15 #include <linux/ioport.h>
16 #include <linux/device.h>
17 #include <linux/delay.h>
18 #include <linux/slab.h>
19 #include <linux/err.h>
29 static irqreturn_t l4bus_int(int irq, void *dev_id, struct pt_regs *regs)
31 struct l4bus_port *port = dev_id;
32 int handled = IRQ_NONE;
39 static int l4bus_write(struct serio *io, unsigned char val)
41 struct l4bus_port *port = io->port_data;
47 static int l4bus_open(struct serio *io)
49 struct l4bus_port *port = io->port_data;
55 static void l4bus_close(struct serio *io)
57 //struct l4bus_port *port = io->port_data;
60 static int l4bus_probe(const char *name)
62 struct l4bus_port *port;
66 port = kmalloc(sizeof(struct l4bus_port), GFP_KERNEL);
67 io = kmalloc(sizeof(struct serio), GFP_KERNEL);
73 memset(port, 0, sizeof(struct l4bus_port));
74 memset(io, 0, sizeof(struct serio));
77 io->write = l4bus_write;
79 io->open = l4bus_open;
80 io->close = l4bus_close;
81 strlcpy(io->name, name, sizeof(io->name));
82 strlcpy(io->phys, name, sizeof(io->phys));
84 //io->dev.parent = &dev->dev;
89 serio_register_port(io);
98 static int __init l4bus_init(void)
100 // FIXME: iterate over vbus to find devices
101 // ... indeed: disabled those two probe functions because they emit a
102 // warning and someone might think there could be working omap input stuff
105 l4bus_probe("OMAP_TSC");
106 l4bus_probe("OMAP_KP");
111 module_init(l4bus_init);
113 MODULE_AUTHOR("Torsten Frenzel");
114 MODULE_DESCRIPTION("L4 bus driver");
115 MODULE_LICENSE("GPL");