2 * LCD panel support for the TI OMAP OSK board
4 * Copyright (C) 2004 Nokia Corporation
5 * Author: Imre Deak <imre.deak@nokia.com>
6 * Adapted for OSK by <dirk.behme@de.bosch.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #include <linux/module.h>
24 #include <linux/platform_device.h>
25 #include <linux/gpio.h>
27 #include <mach/hardware.h>
32 static int osk_panel_enable(struct lcd_panel
*panel
)
34 /* configure PWL pin */
38 omap_writeb(0x01, OMAP_PWL_CLK_ENABLE
);
41 omap_writeb(0xFF, OMAP_PWL_ENABLE
);
43 /* set GPIO2 high (lcd power enabled) */
49 static void osk_panel_disable(struct lcd_panel
*panel
)
51 /* Set PWL level to zero */
52 omap_writeb(0x00, OMAP_PWL_ENABLE
);
54 /* Disable PWL unit */
55 omap_writeb(0x00, OMAP_PWL_CLK_ENABLE
);
61 static struct lcd_panel osk_panel
= {
63 .config
= OMAP_LCDC_PANEL_TFT
,
78 .enable
= osk_panel_enable
,
79 .disable
= osk_panel_disable
,
82 static int osk_panel_probe(struct platform_device
*pdev
)
84 omapfb_register_panel(&osk_panel
);
88 static struct platform_driver osk_panel_driver
= {
89 .probe
= osk_panel_probe
,
95 module_platform_driver(osk_panel_driver
);
97 MODULE_AUTHOR("Imre Deak");
98 MODULE_DESCRIPTION("LCD panel support for the TI OMAP OSK board");
99 MODULE_LICENSE("GPL");