fb_sys_fops.c
这个文件实现了两个函数fb_sys_read和fb_sys_write,同fbmem.c中fb_read和fb_write的区别就在与对screen_base的访问方式不同,fb_sys_read和fb_sys_write完全是对内存的直接访问,而fb_read和fb_write 要通过io操作来访问
fb_sys_*和fb_*函数体的其他部分都非常相似。
fbsysfs.c
fbsysfs实现了framebuffer device class和attributes,就是在sysfs文件系统为framebuffer设备创建一些属性项,这些属性项包括
492 static struct device_attribute device_attrs[] = {
493 __ATTR(bits_per_pixel, S_IRUGO|S_IWUSR, show_bpp, store_bpp),
494 __ATTR(blank, S_IRUGO|S_IWUSR, show_blank, store_blank),
495 __ATTR(console, S_IRUGO|S_IWUSR, show_console, store_console),
496 __ATTR(cursor, S_IRUGO|S_IWUSR, show_cursor, store_cursor),
497 __ATTR(mode, S_IRUGO|S_IWUSR, show_mode, store_mode),
498 __ATTR(modes, S_IRUGO|S_IWUSR, show_modes, store_modes),
499 __ATTR(pan, S_IRUGO|S_IWUSR, show_pan, store_pan),
500 __ATTR(virtual_size, S_IRUGO|S_IWUSR, show_virtual, store_virtual),
501 __ATTR(name, S_IRUGO, show_name, NULL),
502 __ATTR(stride, S_IRUGO, show_stride, NULL),
503 __ATTR(rotate, S_IRUGO|S_IWUSR, show_rotate, store_rotate),
504 __ATTR(state, S_IRUGO|S_IWUSR, show_fbstate, store_fbstate),
505 #ifdef CONFIG_FB_BACKLIGHT
506 __ATTR(bl_curve, S_IRUGO|S_IWUSR, show_bl_curve, store_bl_curve),
507 #endif
508 };