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 <asm/arch/omapfb.h>
31 /* #define OMAPFB_DBG 1 */
35 //static struct clk *h6300_lcd_ck;
37 static int h6300_panel_init(struct omapfb_device *fbdev)
41 if ((h6300_lcd_ck = clk_get (NULL, "lcd_ck")) == NULL) {
42 printk(KERN_ERR "Unable to get the clock LCD_CK!!!\n");
44 } clk_enable(h6300_lcd_ck);
47 printk(KERN_INFO "lcd_h6300.c: h6300_panel_init() done\n");
51 static void h6300_panel_cleanup(void)
56 clk_disable(h6300_lcd_ck);
57 clk_put(h6300_lcd_ck);
62 printk(KERN_INFO "lcd_h6300.c: h6300_panel_cleanup() done\n");
65 static int h6300_panel_enable(void)
69 printk(KERN_INFO "lcd_h6300.c: h6300_panel_enable() done\n");
73 static void h6300_panel_disable(void)
77 printk(KERN_INFO "lcd_h6300.c: h6300_panel_disable() done\n");
80 static unsigned long h6300_panel_get_caps(void)
82 printk(KERN_INFO "lcd_h6300.c: h6300_panel_get_caps() called\n");
86 struct lcd_panel h6300_panel = {
88 .config = OMAP_LCDC_PANEL_TFT,
103 .init = h6300_panel_init,
104 .cleanup = h6300_panel_cleanup,
105 .enable = h6300_panel_enable,
106 .disable = h6300_panel_disable,
107 .get_caps = h6300_panel_get_caps,
110 static int h6300_panel_probe(struct platform_device *pdev)
113 omapfb_register_panel(&h6300_panel);
117 static int h6300_panel_remove(struct platform_device *pdev)
123 static int h6300_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
129 static int h6300_panel_resume(struct platform_device *pdev)
135 struct platform_driver h6300_panel_driver = {
136 .probe = h6300_panel_probe,
137 .remove = h6300_panel_remove,
138 .suspend = h6300_panel_suspend,
139 .resume = h6300_panel_resume,
142 .owner = THIS_MODULE,
146 static int h6300_panel_drv_init(void)
148 return platform_driver_register(&h6300_panel_driver);
151 static void h6300_panel_drv_cleanup(void)
153 platform_driver_unregister(&h6300_panel_driver);
156 module_init(h6300_panel_drv_init);
157 module_exit(h6300_panel_drv_cleanup);