1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * LCD panel support for the TI OMAP1610 Innovator board
5 * Copyright (C) 2004 Nokia Corporation
6 * Author: Imre Deak <imre.deak@nokia.com>
9 #include <linux/module.h>
10 #include <linux/platform_device.h>
12 #include <linux/gpio.h>
15 #define MODULE_NAME "omapfb-lcd_h3"
17 static int innovator1610_panel_init(struct lcd_panel
*panel
,
18 struct omapfb_device
*fbdev
)
22 /* configure GPIO(14, 15) as outputs */
23 if (gpio_request_one(14, GPIOF_OUT_INIT_LOW
, "lcd_en0")) {
24 pr_err(MODULE_NAME
": can't request GPIO 14\n");
28 if (gpio_request_one(15, GPIOF_OUT_INIT_LOW
, "lcd_en1")) {
29 pr_err(MODULE_NAME
": can't request GPIO 15\n");
38 static void innovator1610_panel_cleanup(struct lcd_panel
*panel
)
44 static int innovator1610_panel_enable(struct lcd_panel
*panel
)
46 /* set GPIO14 and GPIO15 high */
47 gpio_set_value(14, 1);
48 gpio_set_value(15, 1);
52 static void innovator1610_panel_disable(struct lcd_panel
*panel
)
54 /* set GPIO13, GPIO14 and GPIO15 low */
55 gpio_set_value(14, 0);
56 gpio_set_value(15, 0);
59 static struct lcd_panel innovator1610_panel
= {
61 .config
= OMAP_LCDC_PANEL_TFT
,
76 .init
= innovator1610_panel_init
,
77 .cleanup
= innovator1610_panel_cleanup
,
78 .enable
= innovator1610_panel_enable
,
79 .disable
= innovator1610_panel_disable
,
82 static int innovator1610_panel_probe(struct platform_device
*pdev
)
84 omapfb_register_panel(&innovator1610_panel
);
88 static struct platform_driver innovator1610_panel_driver
= {
89 .probe
= innovator1610_panel_probe
,
91 .name
= "lcd_inn1610",
95 module_platform_driver(innovator1610_panel_driver
);
97 MODULE_AUTHOR("Imre Deak");
98 MODULE_DESCRIPTION("LCD panel support for the TI OMAP1610 Innovator board");
99 MODULE_LICENSE("GPL");