blob: 2ee423279e358f59d8799ef2d47309a0e074dd4d [file] [log] [blame]
Imre Deak7a6d6ab2007-07-17 04:06:07 -07001/*
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
Tony Lindgren4c98dc62012-10-02 12:39:09 -070026#include <mach/hardware.h>
27
Tomi Valkeinen91773a02009-08-03 15:06:36 +030028#include "omapfb.h"
Imre Deak7a6d6ab2007-07-17 04:06:07 -070029
30static int innovator1510_panel_init(struct lcd_panel *panel,
31 struct omapfb_device *fbdev)
32{
33 return 0;
34}
35
36static void innovator1510_panel_cleanup(struct lcd_panel *panel)
37{
38}
39
40static int innovator1510_panel_enable(struct lcd_panel *panel)
41{
Tony Lindgren4c98dc62012-10-02 12:39:09 -070042 __raw_writeb(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL);
Imre Deak7a6d6ab2007-07-17 04:06:07 -070043 return 0;
44}
45
46static void innovator1510_panel_disable(struct lcd_panel *panel)
47{
Tony Lindgren4c98dc62012-10-02 12:39:09 -070048 __raw_writeb(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL);
Imre Deak7a6d6ab2007-07-17 04:06:07 -070049}
50
51static unsigned long innovator1510_panel_get_caps(struct lcd_panel *panel)
52{
53 return 0;
54}
55
56struct lcd_panel innovator1510_panel = {
57 .name = "inn1510",
58 .config = OMAP_LCDC_PANEL_TFT,
59
60 .bpp = 16,
61 .data_lines = 16,
62 .x_res = 240,
63 .y_res = 320,
64 .pixel_clock = 12500,
65 .hsw = 40,
66 .hfp = 40,
67 .hbp = 72,
68 .vsw = 1,
69 .vfp = 1,
70 .vbp = 0,
71 .pcd = 12,
72
73 .init = innovator1510_panel_init,
74 .cleanup = innovator1510_panel_cleanup,
75 .enable = innovator1510_panel_enable,
76 .disable = innovator1510_panel_disable,
77 .get_caps = innovator1510_panel_get_caps,
78};
79
80static int innovator1510_panel_probe(struct platform_device *pdev)
81{
82 omapfb_register_panel(&innovator1510_panel);
83 return 0;
84}
85
86static int innovator1510_panel_remove(struct platform_device *pdev)
87{
88 return 0;
89}
90
91static int innovator1510_panel_suspend(struct platform_device *pdev,
92 pm_message_t mesg)
93{
94 return 0;
95}
96
97static int innovator1510_panel_resume(struct platform_device *pdev)
98{
99 return 0;
100}
101
Axel Linf9905442011-12-09 09:37:57 +0800102static struct platform_driver innovator1510_panel_driver = {
Imre Deak7a6d6ab2007-07-17 04:06:07 -0700103 .probe = innovator1510_panel_probe,
104 .remove = innovator1510_panel_remove,
105 .suspend = innovator1510_panel_suspend,
106 .resume = innovator1510_panel_resume,
107 .driver = {
108 .name = "lcd_inn1510",
109 .owner = THIS_MODULE,
110 },
111};
112
Axel Linf806f9b2011-12-09 09:59:56 +0800113module_platform_driver(innovator1510_panel_driver);