33 #include <linux/module.h>
34 #include <linux/kernel.h>
35 #include <linux/errno.h>
36 #include <linux/string.h>
38 #include <linux/slab.h>
44 #include <linux/list.h>
57 #define AUOK1901_CMD_LUT_INTERFACE 0x0005
58 #define AUOK1901_CMD_DMA_START 0x1001
59 #define AUOK1901_CMD_CURSOR_START 0x1007
60 #define AUOK1901_CMD_CURSOR_STOP AUOK190X_CMD_DATA_STOP
61 #define AUOK1901_CMD_DDMA_START 0x1009
63 #define AUOK1901_INIT_GATE_PULSE_LOW (0 << 14)
64 #define AUOK1901_INIT_GATE_PULSE_HIGH (1 << 14)
65 #define AUOK1901_INIT_SINGLE_GATE (0 << 13)
66 #define AUOK1901_INIT_DOUBLE_GATE (1 << 13)
79 #define AUOK1901_INIT_FORMAT2 (1 << 7)
80 #define AUOK1901_INIT_FORMAT3 ((1 << 7) | (1 << 6))
81 #define AUOK1901_INIT_FORMAT4 (1 << 8)
82 #define AUOK1901_INIT_FORMAT5 ((1 << 8) | (1 << 6))
83 #define AUOK1901_INIT_FORMAT6 ((1 << 8) | (1 << 7))
84 #define AUOK1901_INIT_FORMAT7 ((1 << 8) | (1 << 7) | (1 << 6))
89 #define AUOK1901_INIT_RESOLUTION(_res) (((_res & (1 << 4)) << 6) \
90 | ((_res & 0xf) << 2))
95 #define AUOK1901_DMA_ROTATE90(_rot) ((_rot & 1) << 13)
100 #define AUOK1901_DDMA_ROTATE180(_rot) ((~_rot & 2) << 10)
122 unsigned char *
buf = (
unsigned char *)par->
info->screen_base;
123 int xres = par->
info->var.xres;
126 pm_runtime_get_sync(dev);
134 dev_dbg(dev,
"update (x,y,w,h,mode)=(%d,%d,%d,%d,%d)\n",
135 1, y1+1, xres, y2-y1, mode);
144 args, ((y2 - y1) * xres)/2,
160 pm_runtime_mark_last_busy(dev);
161 pm_runtime_put_autosuspend(dev);
164 static void auok1901fb_dpy_update_pages(
struct auok190xfb_par *par,
180 auok1901_update_region(par, mode, y1, y2);
190 par->
board->wait_for_rdy(par);
203 auok1901_update_region(par, mode, 0, par->
info->var.yres);
218 board = pdev->
dev.platform_data;
223 init.id =
"auo_k1901fb";
225 init.update_partial = auok1901fb_dpy_update_pages;
226 init.update_all = auok1901fb_dpy_update;
227 init.need_refresh = auok1901fb_need_refresh;
228 init.init = auok1901_init;
239 .probe = auok1901fb_probe,
243 .name =
"auo_k1901fb",