2 * File: drivers/video/omap_new/lcd-h6300.c
4 * LCD panel support for the TI OMAP1510 based iPAQ h63xx series of mobile phones.
5 * (h6315, h6340 and h6365)
7 * Copyright (C) 2009 Mika Laitio
8 * Copyright (C) 2009 Husam Senussi
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include <linux/module.h>
26 #include <linux/platform_device.h>
29 #include <mach/fpga.h>
30 #include <mach/omapfb.h>
32 /* #define OMAPFB_DBG 1 */
34 //static struct clk *h6300_lcd_ck;
36 static int h6300_panel_init(struct omapfb_device *fbdev)
39 if ((h6300_lcd_ck = clk_get (NULL, "lcd_ck")) == NULL) {
40 printk(KERN_ERR "Unable to get the clock LCD_CK!!!\n");
42 } clk_enable(h6300_lcd_ck);
44 printk(KERN_INFO "lcd_h6300.c: h6300_panel_init() done\n");
48 static void h6300_panel_cleanup(void)
52 clk_disable(h6300_lcd_ck);
53 clk_put(h6300_lcd_ck);
57 printk(KERN_INFO "lcd_h6300.c: h6300_panel_cleanup() done\n");
60 static int h6300_panel_enable(void)
62 printk(KERN_INFO "lcd_h6300.c: h6300_panel_enable() done\n");
66 static void h6300_panel_disable(void)
68 printk(KERN_INFO "lcd_h6300.c: h6300_panel_disable() done\n");
71 static unsigned long h6300_panel_get_caps(void)
73 printk(KERN_INFO "lcd_h6300.c: h6300_panel_get_caps() called\n");
77 struct lcd_panel h6300_panel = {
79 .config = OMAP_LCDC_PANEL_TFT,
94 .init = h6300_panel_init,
95 .cleanup = h6300_panel_cleanup,
96 .enable = h6300_panel_enable,
97 .disable = h6300_panel_disable,
98 .get_caps = h6300_panel_get_caps,
101 static int h6300_panel_probe(struct platform_device *pdev)
103 omapfb_register_panel(&h6300_panel);
107 static int h6300_panel_remove(struct platform_device *pdev)
112 static int h6300_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
117 static int h6300_panel_resume(struct platform_device *pdev)
122 struct platform_driver h6300_panel_driver = {
123 .probe = h6300_panel_probe,
124 .remove = h6300_panel_remove,
125 .suspend = h6300_panel_suspend,
126 .resume = h6300_panel_resume,
129 .owner = THIS_MODULE,
133 static int h6300_panel_drv_init(void)
135 return platform_driver_register(&h6300_panel_driver);
138 static void h6300_panel_drv_cleanup(void)
140 platform_driver_unregister(&h6300_panel_driver);
143 module_init(h6300_panel_drv_init);
144 module_exit(h6300_panel_drv_cleanup);