35 #include <linux/module.h>
37 #include <linux/kernel.h>
38 #include <linux/sched.h>
39 #include <linux/errno.h>
40 #include <linux/string.h>
42 #include <linux/slab.h>
59 #include <mach/hardware.h>
62 #include <asm/div64.h>
63 #include <mach/bitfield.h>
74 #define LCCR0_INVALID_CONFIG_MASK (LCCR0_OUM | LCCR0_BM | LCCR0_QDM |\
75 LCCR0_DIS | LCCR0_EFM | LCCR0_IUM |\
76 LCCR0_SFM | LCCR0_LDM | LCCR0_ENB)
78 #define LCCR3_INVALID_CONFIG_MASK (LCCR3_HSP | LCCR3_VSP |\
79 LCCR3_PCD | LCCR3_BPP(0xf))
84 static void setup_base_frame(
struct pxafb_info *fbi,
89 static unsigned long video_mem_size = 0;
91 static inline unsigned long
92 lcd_readl(
struct pxafb_info *fbi,
unsigned int off)
98 lcd_writel(
struct pxafb_info *fbi,
unsigned int off,
unsigned long val)
123 if (state != (
u_int)-1) {
134 return chan << bf->
offset;
147 if (fbi->
fb.var.grayscale) {
154 val = ((red >> 0) & 0xf800);
155 val |= ((green >> 5) & 0x07e0);
156 val |= ((blue >> 11) & 0x001f);
160 val = ((red << 8) & 0x00f80000);
161 val |= ((green >> 0) & 0x0000fc00);
162 val |= ((blue >> 8) & 0x000000f8);
166 val = ((red << 8) & 0x00fc0000);
167 val |= ((green >> 0) & 0x0000fc00);
168 val |= ((blue >> 8) & 0x000000fc);
172 val = ((red << 8) & 0x00ff0000);
173 val |= ((green >> 0) & 0x0000ff00);
174 val |= ((blue >> 8) & 0x000000ff);
198 green = 0xffff -
green;
199 blue = 0xffff -
blue;
206 if (fbi->
fb.var.grayscale)
207 red = green = blue = (19595 * red + 38470 * green +
210 switch (fbi->
fb.fix.visual) {
219 val = chan_to_field(red, &fbi->
fb.var.red);
220 val |= chan_to_field(green, &fbi->
fb.var.green);
221 val |= chan_to_field(blue, &fbi->
fb.var.blue);
230 ret = pxafb_setpalettereg(regno, red, green, blue, trans, info);
240 return var->
red.length + var->
green.length +
250 case 1: bpp = 0;
break;
251 case 2: bpp = 1;
break;
252 case 4: bpp = 2;
break;
253 case 8: bpp = 3;
break;
254 case 16: bpp = 4;
break;
256 switch (var_to_depth(var)) {
257 case 18: bpp = 6;
break;
258 case 19: bpp = 8;
break;
259 case 24: bpp = 9;
break;
263 switch (var_to_depth(var)) {
264 case 18: bpp = 5;
break;
265 case 19: bpp = 7;
break;
266 case 25: bpp = 10;
break;
286 int bpp = pxafb_var_to_bpp(var);
294 switch (var_to_depth(var)) {
305 #define SET_PIXFMT(v, r, g, b, t) \
307 (v)->transp.offset = (t) ? (r) + (g) + (b) : 0; \
308 (v)->transp.length = (t) ? (t) : 0; \
309 (v)->blue.length = (b); (v)->blue.offset = 0; \
310 (v)->green.length = (g); (v)->green.offset = (b); \
311 (v)->red.length = (r); (v)->red.offset = (b) + (g); \
324 var->
red.offset = 0; var->
red.length = 8;
326 var->
blue.offset = 0; var->
blue.length = 8;
331 case 16: var->
transp.length ?
336 case 24: var->
transp.length ?
343 #ifdef CONFIG_CPU_FREQ
369 unsigned int best_x = 0xffffffff, best_y = 0xffffffff;
373 if (modelist[i].
xres >= var->
xres &&
375 modelist[i].
xres < best_x &&
376 modelist[i].
yres < best_y &&
378 best_x = modelist[
i].
xres;
379 best_y = modelist[
i].
yres;
405 pxafb_set_pixfmt(var, mode->
depth);
408 static int pxafb_adjust_timing(
struct pxafb_info *fbi,
427 line_length =
ALIGN(line_length, 4);
466 mode = pxafb_getmode(inf, var);
469 pxafb_setmode(var, mode);
473 err = pxafb_var_to_bpp(var);
477 pxafb_set_pixfmt(var, var_to_depth(var));
479 err = pxafb_adjust_timing(fbi, var);
483 #ifdef CONFIG_CPU_FREQ
484 pr_debug(
"pxafb: dma period = %d ps\n",
485 pxafb_display_dma_period(var));
495 static int pxafb_set_par(
struct fb_info *info)
523 if (fbi->
fb.var.bits_per_pixel >= 16)
528 pxafb_activate_var(var, fbi);
546 memcpy(&newvar, &fbi->
fb.var,
sizeof(newvar));
552 setup_base_frame(fbi, &newvar, 1);
555 lcd_writel(fbi,
FBR1, fbi->
fdadr[dma + 1] | 0x1);
557 lcd_writel(fbi,
FBR0, fbi->
fdadr[dma] | 0x1);
567 static int pxafb_blank(
int blank,
struct fb_info *info)
580 pxafb_setpalettereg(i, 0, 0, 0, 0, info);
596 static struct fb_ops pxafb_ops = {
598 .fb_check_var = pxafb_check_var,
599 .fb_set_par = pxafb_set_par,
600 .fb_pan_display = pxafb_pan_display,
601 .fb_setcolreg = pxafb_setcolreg,
605 .fb_blank = pxafb_blank,
608 #ifdef CONFIG_FB_PXA_OVERLAY
609 static void overlay1fb_setup(
struct pxafb_layer *ofb)
611 int size = ofb->
fb.fix.line_length * ofb->
fb.var.yres_virtual;
619 static void overlay1fb_enable(
struct pxafb_layer *ofb)
629 static void overlay1fb_disable(
struct pxafb_layer *ofb)
645 pr_warning(
"%s: timeout disabling overlay1\n", __func__);
650 static void overlay2fb_setup(
struct pxafb_layer *ofb)
656 size = ofb->
fb.fix.line_length * ofb->
fb.var.yres_virtual;
657 setup_frame_dma(ofb->
fbi,
DMA_OV2_Y, -1, start[0], size);
659 size = ofb->
fb.var.xres_virtual * ofb->
fb.var.yres_virtual;
665 start[1] = start[0] +
size;
666 start[2] = start[1] + size /
div;
667 setup_frame_dma(ofb->
fbi,
DMA_OV2_Y, -1, start[0], size);
668 setup_frame_dma(ofb->
fbi,
DMA_OV2_Cb, -1, start[1], size / div);
669 setup_frame_dma(ofb->
fbi,
DMA_OV2_Cr, -1, start[2], size / div);
673 static void overlay2fb_enable(
struct pxafb_layer *ofb)
692 static void overlay2fb_disable(
struct pxafb_layer *ofb)
696 if (!(lcd_readl(ofb->
fbi,
OVL2C1) & OVLxC1_OEN))
710 pr_warning(
"%s: timeout disabling overlay2\n", __func__);
715 .
enable = overlay1fb_enable,
716 .disable = overlay1fb_disable,
717 .setup = overlay1fb_setup,
720 .enable = overlay2fb_enable,
721 .disable = overlay2fb_disable,
722 .setup = overlay2fb_setup,
726 static int overlayfb_open(
struct fb_info *info,
int user)
734 if (ofb->
usage++ == 0) {
744 static int overlayfb_release(
struct fb_info *info,
int user)
748 if (ofb->
usage == 1) {
749 ofb->
ops->disable(ofb);
750 ofb->
fb.var.height = -1;
751 ofb->
fb.var.width = -1;
752 ofb->
fb.var.xres = ofb->
fb.var.xres_virtual = 0;
753 ofb->
fb.var.yres = ofb->
fb.var.yres_virtual = 0;
765 int xpos, ypos, pfor,
bpp;
771 bpp = pxafb_var_to_bpp(var);
782 bpp = pxafb_var_to_bpp(var);
786 pxafb_set_pixfmt(var, var_to_depth(var));
797 if ((xpos * bpp) % 32)
803 if ((xpos + var->
xres > base_var->
xres) ||
804 (ypos + var->
yres > base_var->
yres))
812 static int overlayfb_check_video_memory(
struct pxafb_layer *ofb)
837 static int overlayfb_set_par(
struct fb_info *info)
841 int xpos, ypos, pfor,
bpp,
ret;
843 ret = overlayfb_check_video_memory(ofb);
847 bpp = pxafb_var_to_bpp(var);
859 ofb->
ops->setup(ofb);
860 ofb->
ops->enable(ofb);
864 static struct fb_ops overlay_fb_ops = {
866 .fb_open = overlayfb_open,
867 .fb_release = overlayfb_release,
868 .fb_check_var = overlayfb_check_var,
869 .fb_set_par = overlayfb_set_par,
875 sprintf(ofb->
fb.fix.id,
"overlay%d",
id + 1);
878 ofb->
fb.fix.xpanstep = 0;
879 ofb->
fb.fix.ypanstep = 1;
882 ofb->
fb.var.height = -1;
883 ofb->
fb.var.width = -1;
886 ofb->
fb.fbops = &overlay_fb_ops;
889 ofb->
fb.pseudo_palette =
NULL;
892 ofb->
ops = &ofb_ops[
id];
898 static inline int pxafb_overlay_supported(
void)
934 if (!pxafb_overlay_supported())
937 for (i = 0; i < 2; i++) {
939 init_pxafb_overlay(fbi, ofb, i);
942 dev_err(fbi->
dev,
"failed to register overlay %d\n", i);
945 ret = pxafb_overlay_map_video_memory(fbi, ofb);
948 "failed to map video memory for overlay %d\n",
957 lcd_writel(fbi,
LCCR5, ~0);
959 pr_info(
"PXA Overlay driver loaded successfully!\n");
966 if (!pxafb_overlay_supported())
969 for (i = 0; i < 2; i++) {
980 static inline void pxafb_overlay_init(
struct pxafb_info *fbi) {}
981 static inline void pxafb_overlay_exit(
struct pxafb_info *fbi) {}
1014 static inline unsigned int get_pcd(
struct pxafb_info *fbi,
1015 unsigned int pixclock)
1017 unsigned long long pcd;
1024 do_div(pcd, 100000000 * 2);
1027 return (
unsigned int)pcd;
1036 static inline void set_hsync_time(
struct pxafb_info *fbi,
unsigned int pcd)
1038 unsigned long htime;
1040 if ((pcd == 0) || (fbi->
fb.var.hsync_len == 0)) {
1062 static int setup_frame_dma(
struct pxafb_info *fbi,
int dma,
int pal,
1063 unsigned long start,
size_t size)
1066 unsigned int dma_desc_off, pal_desc_off;
1068 if (dma < 0 || dma >=
DMA_MAX * 2)
1078 if (pal < 0 || pal >=
PAL_MAX * 2) {
1104 static void setup_base_frame(
struct pxafb_info *fbi,
1112 dma = DMA_BASE + (branch ?
DMA_MAX : 0);
1119 nbytes = nbytes / 2;
1120 setup_frame_dma(fbi, dma + 1,
PAL_NONE, offset + nbytes, nbytes);
1123 setup_frame_dma(fbi, dma, pal, offset, nbytes);
1126 #ifdef CONFIG_FB_PXA_SMARTPANEL
1127 static int setup_smart_dma(
struct pxafb_info *fbi)
1130 unsigned long dma_desc_off, cmd_buff_off;
1145 int pxafb_smart_flush(
struct fb_info *info)
1159 while (fbi->n_smart_cmds & 1)
1164 setup_smart_dma(fbi);
1168 lcd_writel(fbi,
PRSR, prsr);
1171 lcd_writel(fbi,
CMDCR, 0x0001);
1187 pr_warning(
"%s: timeout waiting for command done\n",
1194 lcd_writel(fbi,
PRSR, prsr);
1196 lcd_writel(fbi,
FDADR6, 0);
1197 fbi->n_smart_cmds = 0;
1206 for (i = 0; i <
n_cmds; i++, cmds++) {
1209 pxafb_smart_flush(info);
1216 pxafb_smart_flush(info);
1218 fbi->smart_cmds[fbi->n_smart_cmds++] = *
cmds;
1224 static unsigned int __smart_timing(
unsigned time_ns,
unsigned long lcd_clk)
1226 unsigned int t = (time_ns * (lcd_clk / 1000000) / 1000);
1227 return (t == 0) ? 1 :
t;
1230 static void setup_smart_timing(
struct pxafb_info *fbi,
1258 static int pxafb_smart_thread(
void *
arg)
1264 pr_err(
"%s: not properly initialized, thread terminated\n",
1268 inf = fbi->
dev->platform_data;
1270 pr_debug(
"%s(): task starting\n", __func__);
1275 if (try_to_freeze())
1291 pr_debug(
"%s(): task ending\n", __func__);
1295 static int pxafb_smart_init(
struct pxafb_info *fbi)
1301 fbi->n_smart_cmds = 0;
1303 init_completion(&fbi->command_done);
1304 init_completion(&fbi->refresh_done);
1306 fbi->smart_thread =
kthread_run(pxafb_smart_thread, fbi,
1308 if (IS_ERR(fbi->smart_thread)) {
1309 pr_err(
"%s: unable to create kernel thread\n", __func__);
1310 return PTR_ERR(fbi->smart_thread);
1316 static inline int pxafb_smart_init(
struct pxafb_info *fbi) {
return 0; }
1319 static void setup_parallel_timing(
struct pxafb_info *fbi,
1322 unsigned int lines_per_panel, pcd = get_pcd(fbi, var->
pixclock);
1334 lines_per_panel = var->
yres;
1336 lines_per_panel /= 2;
1352 set_hsync_time(fbi, pcd);
1369 #ifdef CONFIG_FB_PXA_SMARTPANEL
1371 setup_smart_timing(fbi, var);
1374 setup_parallel_timing(fbi, var);
1376 setup_base_frame(fbi, var, 0);
1382 fbi->
reg_lccr3 |= pxafb_var_to_lccr3(var);
1411 static inline void __pxafb_backlight_power(
struct pxafb_info *fbi,
int on)
1413 pr_debug(
"pxafb: backlight o%s\n", on ?
"n" :
"ff");
1419 static inline void __pxafb_lcd_power(
struct pxafb_info *fbi,
int on)
1421 pr_debug(
"pxafb: LCD power o%s\n", on ?
"n" :
"ff");
1427 static void pxafb_enable_controller(
struct pxafb_info *fbi)
1429 pr_debug(
"pxafb: Enabling LCD controller\n");
1438 clk_prepare_enable(fbi->
clk);
1456 static void pxafb_disable_controller(
struct pxafb_info *fbi)
1460 #ifdef CONFIG_FB_PXA_SMARTPANEL
1469 lcd_writel(fbi,
LCSR, 0xffffffff);
1472 lcd_writel(fbi,
LCCR0, lccr0);
1478 clk_disable_unprepare(fbi->
clk);
1487 unsigned int lccr0, lcsr;
1489 lcsr = lcd_readl(fbi,
LCSR);
1491 lccr0 = lcd_readl(fbi,
LCCR0);
1496 #ifdef CONFIG_FB_PXA_SMARTPANEL
1500 lcd_writel(fbi,
LCSR, lcsr);
1502 #ifdef CONFIG_FB_PXA_OVERLAY
1504 unsigned int lcsr1 = lcd_readl(fbi,
LCSR1);
1506 complete(&fbi->overlay[0].branch_done);
1509 complete(&fbi->overlay[1].branch_done);
1511 lcd_writel(fbi,
LCSR1, lcsr1);
1528 old_state = fbi->
state;
1545 pxafb_disable_controller(fbi);
1556 __pxafb_backlight_power(fbi, 0);
1557 __pxafb_lcd_power(fbi, 0);
1559 pxafb_disable_controller(fbi);
1570 pxafb_enable_controller(fbi);
1582 __pxafb_lcd_power(fbi, 0);
1583 pxafb_disable_controller(fbi);
1584 pxafb_enable_controller(fbi);
1585 __pxafb_lcd_power(fbi, 1);
1606 pxafb_enable_controller(fbi);
1607 __pxafb_lcd_power(fbi, 1);
1608 __pxafb_backlight_power(fbi, 1);
1625 set_ctrlr_state(fbi, state);
1628 #ifdef CONFIG_CPU_FREQ
1645 #ifdef CONFIG_FB_PXA_OVERLAY
1646 if (!(fbi->overlay[0].usage || fbi->overlay[1].usage))
1652 pcd = get_pcd(fbi, fbi->
fb.var.pixclock);
1653 set_hsync_time(fbi, pcd);
1663 pxafb_freq_policy(
struct notifier_block *nb,
unsigned long val,
void *data)
1673 "new clock %d kHz\n", pxafb_display_dma_period(var),
1687 static int pxafb_suspend(
struct device *
dev)
1695 static int pxafb_resume(
struct device *
dev)
1703 static const struct dev_pm_ops pxafb_pm_ops = {
1705 .resume = pxafb_resume,
1727 static void pxafb_decode_mach_info(
struct pxafb_info *fbi,
1730 unsigned int lcd_conn = inf->
lcd_conn;
1774 pxafb_setmode(&fbi->
fb.var, &inf->
modes[0]);
1781 for (i = 0, m = &inf->
modes[0]; i < inf->num_modes; i++, m++)
1807 if (IS_ERR(fbi->
clk)) {
1815 fbi->
fb.fix.type_aux = 0;
1816 fbi->
fb.fix.xpanstep = 0;
1817 fbi->
fb.fix.ypanstep = 1;
1818 fbi->
fb.fix.ywrapstep = 0;
1821 fbi->
fb.var.nonstd = 0;
1823 fbi->
fb.var.height = -1;
1824 fbi->
fb.var.width = -1;
1828 fbi->
fb.fbops = &pxafb_ops;
1834 fbi->
fb.pseudo_palette =
addr;
1839 pxafb_decode_mach_info(fbi, inf);
1841 #ifdef CONFIG_FB_PXA_OVERLAY
1843 if (pxafb_overlay_supported())
1855 #ifdef CONFIG_FB_PXA_PARAMETERS
1856 static int __devinit parse_opt_mode(
struct device *dev,
const char *this_opt)
1860 const char *
name = this_opt+5;
1862 int res_specified = 0, bpp_specified = 0;
1863 unsigned int xres = 0, yres = 0, bpp = 0;
1864 int yres_specified = 0;
1866 for (i = namelen-1; i >= 0; i--) {
1870 if (!bpp_specified && !yres_specified) {
1877 if (!yres_specified) {
1889 if (i < 0 && yres_specified) {
1894 if (res_specified) {
1895 dev_info(dev,
"overriding resolution: %dx%d\n", xres, yres);
1896 inf->
modes[0].xres = xres; inf->
modes[0].yres = yres;
1906 dev_info(dev,
"overriding bit depth: %d\n", bpp);
1909 dev_err(dev,
"Depth %d is not valid\n", bpp);
1923 if (!
strncmp(this_opt,
"vmem:", 5)) {
1925 }
else if (!
strncmp(this_opt,
"mode:", 5)) {
1926 return parse_opt_mode(dev, this_opt);
1927 }
else if (!
strncmp(this_opt,
"pixclock:", 9)) {
1930 }
else if (!
strncmp(this_opt,
"left:", 5)) {
1933 }
else if (!
strncmp(this_opt,
"right:", 6)) {
1936 }
else if (!
strncmp(this_opt,
"upper:", 6)) {
1939 }
else if (!
strncmp(this_opt,
"lower:", 6)) {
1942 }
else if (!
strncmp(this_opt,
"hsynclen:", 9)) {
1945 }
else if (!
strncmp(this_opt,
"vsynclen:", 9)) {
1948 }
else if (!
strncmp(this_opt,
"hsync:", 6)) {
1950 sprintf(s,
"hsync: Active Low\n");
1953 sprintf(s,
"hsync: Active High\n");
1956 }
else if (!
strncmp(this_opt,
"vsync:", 6)) {
1958 sprintf(s,
"vsync: Active Low\n");
1961 sprintf(s,
"vsync: Active High\n");
1964 }
else if (!
strncmp(this_opt,
"dpc:", 4)) {
1966 sprintf(s,
"double pixel clock: false\n");
1969 sprintf(s,
"double pixel clock: true\n");
1972 }
else if (!
strncmp(this_opt,
"outputen:", 9)) {
1974 sprintf(s,
"output enable: active low\n");
1977 sprintf(s,
"output enable: active high\n");
1980 }
else if (!
strncmp(this_opt,
"pixclockpol:", 12)) {
1982 sprintf(s,
"pixel clock polarity: falling edge\n");
1985 sprintf(s,
"pixel clock polarity: rising edge\n");
1988 }
else if (!
strncmp(this_opt,
"color", 5)) {
1990 }
else if (!
strncmp(this_opt,
"mono", 4)) {
1992 }
else if (!
strncmp(this_opt,
"active", 6)) {
1994 }
else if (!
strncmp(this_opt,
"passive", 7)) {
1996 }
else if (!
strncmp(this_opt,
"single", 6)) {
1998 }
else if (!
strncmp(this_opt,
"dual", 4)) {
2000 }
else if (!
strncmp(this_opt,
"4pix", 4)) {
2002 }
else if (!
strncmp(this_opt,
"8pix", 4)) {
2005 dev_err(dev,
"unknown option: %s\n", this_opt);
2020 if (!options || !*options)
2023 dev_dbg(dev,
"options are \"%s\"\n", options ? options :
"null");
2026 while ((this_opt =
strsep(&options,
",")) !=
NULL) {
2027 ret = parse_opt(dev, this_opt);
2039 char *options =
NULL;
2045 strlcpy(g_options, options,
sizeof(g_options));
2050 #define pxafb_setup_options() (0)
2053 MODULE_PARM_DESC(options,
"LCD parameters (see Documentation/fb/pxafb.txt)");
2057 #define pxafb_parse_options(...) (0)
2058 #define pxafb_setup_options() (0)
2071 dev_warn(dev,
"machine LCCR0 setting contains "
2072 "illegal bits: %08x\n",
2075 dev_warn(dev,
"machine LCCR3 setting contains "
2076 "illegal bits: %08x\n",
2082 dev_warn(dev,
"Double Pixel Data (DPD) mode is "
2083 "only valid in passive mono"
2084 " single panel mode\n");
2087 dev_warn(dev,
"Dual panel only valid in passive mode\n");
2089 (inf->
modes->upper_margin || inf->
modes->lower_margin))
2090 dev_warn(dev,
"Upper and lower margins must be 0 in "
2094 #define pxafb_check_options(...) do {} while (0)
2106 inf = dev->
dev.platform_data;
2116 pxafb_check_options(&dev->
dev, inf);
2122 if (inf->
modes->xres == 0 ||
2123 inf->
modes->yres == 0 ||
2124 inf->
modes->bpp == 0) {
2125 dev_err(&dev->
dev,
"Invalid resolution or bit depth\n");
2130 fbi = pxafb_init_fbinfo(&dev->
dev);
2133 dev_err(&dev->
dev,
"Failed to initialize framebuffer device\n");
2146 dev_err(&dev->
dev,
"no I/O memory resource defined\n");
2153 dev_err(&dev->
dev,
"failed to request I/O memory\n");
2160 dev_err(&dev->
dev,
"failed to map I/O memory\n");
2162 goto failed_free_res;
2169 dev_err(&dev->
dev,
"failed to allocate memory for DMA\n");
2171 goto failed_free_io;
2174 ret = pxafb_init_video_memory(fbi);
2176 dev_err(&dev->
dev,
"Failed to allocate video RAM: %d\n", ret);
2178 goto failed_free_dma;
2185 goto failed_free_mem;
2188 ret =
request_irq(irq, pxafb_handle_irq, 0,
"LCD", fbi);
2190 dev_err(&dev->
dev,
"request_irq failed: %d\n", ret);
2192 goto failed_free_mem;
2195 ret = pxafb_smart_init(fbi);
2197 dev_err(&dev->
dev,
"failed to initialize smartpanel\n");
2198 goto failed_free_irq;
2205 ret = pxafb_check_var(&fbi->
fb.var, &fbi->
fb);
2207 dev_err(&dev->
dev,
"failed to get suitable mode\n");
2208 goto failed_free_irq;
2211 ret = pxafb_set_par(&fbi->
fb);
2213 dev_err(&dev->
dev,
"Failed to set parameters\n");
2214 goto failed_free_irq;
2217 platform_set_drvdata(dev, fbi);
2222 "Failed to register framebuffer device: %d\n", ret);
2223 goto failed_free_cmap;
2226 pxafb_overlay_init(fbi);
2228 #ifdef CONFIG_CPU_FREQ
2229 fbi->freq_transition.notifier_call = pxafb_freq_transition;
2230 fbi->freq_policy.notifier_call = pxafb_freq_policy;
2245 if (fbi->
fb.cmap.len)
2260 platform_set_drvdata(dev,
NULL);
2268 struct pxafb_info *fbi = platform_get_drvdata(dev);
2278 pxafb_overlay_exit(fbi);
2281 pxafb_disable_controller(fbi);
2283 if (fbi->
fb.cmap.len)
2306 .probe = pxafb_probe,
2310 .name =
"pxa2xx-fb",
2312 .pm = &pxafb_pm_ops,
2317 static int __init pxafb_init(
void)
2325 static void __exit pxafb_exit(
void)