When we have to manage a peripheral, it's quite common to need to modify its internal configuration settings, or it may be useful to map it from the user space as if it was a memory buffer in which we can modify internal data just by referencing a pointer.
For example, frame buffers or frame grabbers are good candidates to be mapped as a big chunk of memory from the user space point of view.
In this case, having the support of the lseek(), ioctl(), and mmap() system calls is fundamental. If, from the user space, the usage of these system calls is not tricky, within the kernel they require some attention by the driver developer, especially the mmap() system call, which involves the kernel Memory Management Unit (MMU).
Not only that one of the principal tasks a driver developer must pay attention to is the data exchanging mechanism with the user space...