Drivers methods consist of probe() and remove() functions. Prior to going further with these method descriptions, let us set up our fb_ops structure:
static struct fb_ops myfb_ops = {
.owner = THIS_MODULE,
.fb_check_var = myfb_check_var,
.fb_set_par = myfb_set_par,
.fb_setcolreg = myfb_setcolreg,
.fb_fillrect = cfb_fillrect, /* Those three hooks are */
.fb_copyarea = cfb_copyarea, /* non accelerated and */
.fb_imageblit = cfb_imageblit, /* are provided by kernel */
.fb_blank = myfb_blank,
};
- Probe: The driver probe function is in charge of initializing the hardware, creating the struct fb_info structure using the framebuffer_alloc() function, and using register_framebuffer() on it. The following sample assumes the device is memory mapped. Therefore, your nonmemory map can exist, such as screen sitting...