The driver for the linux operating system has a fixed mode. The main job of writing a driver is to write sub-functions such as open, read, write, ioctl, etc., to fill the various fields of file_operations. Once written, the Linux kernel can support the control of the motor module either as a module or directly into the kernel.