2 * LCD panel support for the TI OMAP H3 board
4 * Copyright (C) 2004 Nokia Corporation
5 * Author: Imre Deak <imre.deak@nokia.com>
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.
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.
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.
22 #include <linux/module.h>
23 #include <linux/platform_device.h>
24 #include <linux/mfd/tps65010.h>
25 #include <linux/gpio.h>
29 #define MODULE_NAME "omapfb-lcd_h3"
31 static int h3_panel_enable(struct lcd_panel
*panel
)
35 /* GPIO1 and GPIO2 of TPS65010 send LCD_ENBKL and LCD_ENVDD signals */
36 r
= tps65010_set_gpio_out_value(GPIO1
, HIGH
);
38 r
= tps65010_set_gpio_out_value(GPIO2
, HIGH
);
40 pr_err(MODULE_NAME
": Unable to turn on LCD panel\n");
45 static void h3_panel_disable(struct lcd_panel
*panel
)
49 /* GPIO1 and GPIO2 of TPS65010 send LCD_ENBKL and LCD_ENVDD signals */
50 r
= tps65010_set_gpio_out_value(GPIO1
, LOW
);
52 tps65010_set_gpio_out_value(GPIO2
, LOW
);
54 pr_err(MODULE_NAME
": Unable to turn off LCD panel\n");
57 static struct lcd_panel h3_panel
= {
59 .config
= OMAP_LCDC_PANEL_TFT
,
74 .enable
= h3_panel_enable
,
75 .disable
= h3_panel_disable
,
78 static int h3_panel_probe(struct platform_device
*pdev
)
80 omapfb_register_panel(&h3_panel
);
84 static struct platform_driver h3_panel_driver
= {
85 .probe
= h3_panel_probe
,
91 module_platform_driver(h3_panel_driver
);
93 MODULE_AUTHOR("Imre Deak");
94 MODULE_DESCRIPTION("LCD panel support for the TI OMAP H3 board");
95 MODULE_LICENSE("GPL");