diff options
author | Imre Deak <imre.deak@solidboot.com> | 2007-07-17 07:06:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:23:14 -0400 |
commit | 7a6d6ab141b59de87b4637e7d75d1e9d5e55e0d4 (patch) | |
tree | 2378e2e9585c06bcbe0653f9300978ada5f43228 /drivers | |
parent | d64ca86e4b693feda63d4732e3a58dbc653c1970 (diff) |
OMAP: LCD panel support for the TI OMAP1510 Innovator board
- Add TFT LCD panel spport for TI OMAP1510 Innovator EVM.
Signed-off-by: Trilok Soni <soni.trilok@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/omap/Makefile | 1 | ||||
-rw-r--r-- | drivers/video/omap/lcd_inn1510.c | 124 |
2 files changed, 125 insertions, 0 deletions
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile index 35354c2ec839..3ec2da4fb1e8 100644 --- a/drivers/video/omap/Makefile +++ b/drivers/video/omap/Makefile | |||
@@ -21,6 +21,7 @@ objs-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o | |||
21 | objs-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o | 21 | objs-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o |
22 | objs-y$(CONFIG_MACH_OMAP_PALMZ71) += lcd_palmz71.o | 22 | objs-y$(CONFIG_MACH_OMAP_PALMZ71) += lcd_palmz71.o |
23 | objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o | 23 | objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o |
24 | objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o | ||
24 | 25 | ||
25 | omapfb-objs := $(objs-yy) | 26 | omapfb-objs := $(objs-yy) |
26 | 27 | ||
diff --git a/drivers/video/omap/lcd_inn1510.c b/drivers/video/omap/lcd_inn1510.c new file mode 100644 index 000000000000..551f385861d1 --- /dev/null +++ b/drivers/video/omap/lcd_inn1510.c | |||
@@ -0,0 +1,124 @@ | |||
1 | /* | ||
2 | * LCD panel support for the TI OMAP1510 Innovator board | ||
3 | * | ||
4 | * Copyright (C) 2004 Nokia Corporation | ||
5 | * Author: Imre Deak <imre.deak@nokia.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License along | ||
18 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
20 | */ | ||
21 | |||
22 | #include <linux/module.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/io.h> | ||
25 | |||
26 | #include <asm/arch/fpga.h> | ||
27 | #include <asm/arch/omapfb.h> | ||
28 | |||
29 | static int innovator1510_panel_init(struct lcd_panel *panel, | ||
30 | struct omapfb_device *fbdev) | ||
31 | { | ||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | static void innovator1510_panel_cleanup(struct lcd_panel *panel) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | static int innovator1510_panel_enable(struct lcd_panel *panel) | ||
40 | { | ||
41 | fpga_write(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL); | ||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | static void innovator1510_panel_disable(struct lcd_panel *panel) | ||
46 | { | ||
47 | fpga_write(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL); | ||
48 | } | ||
49 | |||
50 | static unsigned long innovator1510_panel_get_caps(struct lcd_panel *panel) | ||
51 | { | ||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | struct lcd_panel innovator1510_panel = { | ||
56 | .name = "inn1510", | ||
57 | .config = OMAP_LCDC_PANEL_TFT, | ||
58 | |||
59 | .bpp = 16, | ||
60 | .data_lines = 16, | ||
61 | .x_res = 240, | ||
62 | .y_res = 320, | ||
63 | .pixel_clock = 12500, | ||
64 | .hsw = 40, | ||
65 | .hfp = 40, | ||
66 | .hbp = 72, | ||
67 | .vsw = 1, | ||
68 | .vfp = 1, | ||
69 | .vbp = 0, | ||
70 | .pcd = 12, | ||
71 | |||
72 | .init = innovator1510_panel_init, | ||
73 | .cleanup = innovator1510_panel_cleanup, | ||
74 | .enable = innovator1510_panel_enable, | ||
75 | .disable = innovator1510_panel_disable, | ||
76 | .get_caps = innovator1510_panel_get_caps, | ||
77 | }; | ||
78 | |||
79 | static int innovator1510_panel_probe(struct platform_device *pdev) | ||
80 | { | ||
81 | omapfb_register_panel(&innovator1510_panel); | ||
82 | return 0; | ||
83 | } | ||
84 | |||
85 | static int innovator1510_panel_remove(struct platform_device *pdev) | ||
86 | { | ||
87 | return 0; | ||
88 | } | ||
89 | |||
90 | static int innovator1510_panel_suspend(struct platform_device *pdev, | ||
91 | pm_message_t mesg) | ||
92 | { | ||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | static int innovator1510_panel_resume(struct platform_device *pdev) | ||
97 | { | ||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | struct platform_driver innovator1510_panel_driver = { | ||
102 | .probe = innovator1510_panel_probe, | ||
103 | .remove = innovator1510_panel_remove, | ||
104 | .suspend = innovator1510_panel_suspend, | ||
105 | .resume = innovator1510_panel_resume, | ||
106 | .driver = { | ||
107 | .name = "lcd_inn1510", | ||
108 | .owner = THIS_MODULE, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | static int innovator1510_panel_drv_init(void) | ||
113 | { | ||
114 | return platform_driver_register(&innovator1510_panel_driver); | ||
115 | } | ||
116 | |||
117 | static void innovator1510_panel_drv_cleanup(void) | ||
118 | { | ||
119 | platform_driver_unregister(&innovator1510_panel_driver); | ||
120 | } | ||
121 | |||
122 | module_init(innovator1510_panel_drv_init); | ||
123 | module_exit(innovator1510_panel_drv_cleanup); | ||
124 | |||