LCD驱动 15-1
app: read()
--------------------------------------------------------------------------------------------
kernel:
fb_read
int fbidx = iminor(inode);
struct fb_info *info = registered_fb[fbidx];
if (info->fbops->fb_read) return info->fbops->fb_read(info, buf, count, ppos);
src = (u32 __iomem *) (info->screen_base + p); dst = buffer;
*dst++ = fb_readl(src++);
copy_to_user(buf, buffer, c)
问:registered_fb【】在谁来设置
答:register_framebuffer
怎么写LCD驱动程序呢?
1.分配一个fb_info结构体: framebuffer_alloc
2.设置
3.注册
4.硬件相关操