sync hh.org
[hh.org.git] / arch / arm / mach-pxa / eseries / e330_lcd.c
blob1dc7342ae193221461d9dcd7b36520bc30d173e0
1 /*
2 * e330_lcd.c
4 * (c) 2006 Ian Molton <spyro@f2s.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
12 #include <linux/vsfb.h>
13 #include <linux/platform_device.h>
14 #include <linux/fb.h>
15 #include <asm/mach-types.h>
17 static struct fb_var_screeninfo e330_vsfb_var = {
18 .xres = 240,
19 .yres = 320,
20 .xres_virtual = 240,
21 .yres_virtual = 320,
22 .bits_per_pixel = 16,
23 .red = { 11, 5, 0 },
24 .green = { 5, 6, 0 },
25 .blue = { 0, 5, 0 },
26 .activate = FB_ACTIVATE_NOW,
27 .height = -1,
28 .width = -1,
29 .vmode = FB_VMODE_NONINTERLACED,
32 static struct fb_fix_screeninfo e330_vsfb_fix = {
33 .id = "vsfb",
34 .smem_start = 0x0c042000,
35 .smem_len = 240*320*2,
36 .type = FB_TYPE_PACKED_PIXELS,
37 .visual = FB_VISUAL_TRUECOLOR,
38 .line_length = 240*2, // For gods sake fix this
39 .accel = FB_ACCEL_NONE,
42 static struct vsfb_deviceinfo e330_vsfb_deviceinfo = {
43 .fix = &e330_vsfb_fix,
44 .var = &e330_vsfb_var,
47 static struct platform_device e330_vsfb_device = {
48 .name = "vsfb",
49 .id = -1,
50 .dev = {
51 .platform_data = &e330_vsfb_deviceinfo,
55 static int e330_lcd_init (void) {
57 if (!machine_is_e330 ())
58 return -ENODEV;
60 platform_device_register(&e330_vsfb_device);
62 return 0;
65 module_init (e330_lcd_init);
66 //module_exit (e740_lcd_exit);
68 MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
69 MODULE_DESCRIPTION("e330 lcd driver");
70 MODULE_LICENSE("GPLv2");