Simple Linux character device driver.

Character device is a one of the simplest way to communicate with module in the Linux kernel.
This devices are presented as special files in a /dev directory and supports direct reading and writing of any data, byte by byte, like a stream. Actually most of the pseudo-devices in /dev is a character devices: serial ports, modems, sound and video adapters, keyboards, some custom I/O interfaces. User space programs can easily open, read, write and do custom control requests with such device files.
Here I describing how to write a simple Linux kernel module which can create one or multiple character device.

Continue reading “Simple Linux character device driver.”