Hello.

I'm writing a PS/2 keyboard driver. The keyboard doesn't have a controlling
chip, and I use I/O simulation of PS/2 instead. The problem is that the I/O
subsystem of kernel 2.6 tells there are three layers about this: device
driver, input and event. When I check the code I find an extra "serio" layer
under "device driver". What's the relationship of "serio" and the I/O
subsystem?

I think the "serio" might be the abstraction of some serial IOs for
manipulation. But how does it connect with the actual IOs?

So there might be two implementations of this and I wonder if either of them
could do:
1. Write the driver under input layer, just like gpio_key
2. Write under device driver layer, so the "serio" can manage all my drivers

Any advice or reference material is appreciated.