1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * LCD panel support for the TI OMAP H3 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>
11 #include <linux/mfd/tps65010.h>
12 #include <linux/gpio.h>
16 #define MODULE_NAME "omapfb-lcd_h3"
18 static int h3_panel_enable(struct lcd_panel
*panel
)
22 /* GPIO1 and GPIO2 of TPS65010 send LCD_ENBKL and LCD_ENVDD signals */
23 r
= tps65010_set_gpio_out_value(GPIO1
, HIGH
);
25 r
= tps65010_set_gpio_out_value(GPIO2
, HIGH
);
27 pr_err(MODULE_NAME
": Unable to turn on LCD panel\n");
32 static void h3_panel_disable(struct lcd_panel
*panel
)
36 /* GPIO1 and GPIO2 of TPS65010 send LCD_ENBKL and LCD_ENVDD signals */
37 r
= tps65010_set_gpio_out_value(GPIO1
, LOW
);
39 tps65010_set_gpio_out_value(GPIO2
, LOW
);
41 pr_err(MODULE_NAME
": Unable to turn off LCD panel\n");
44 static struct lcd_panel h3_panel
= {
46 .config
= OMAP_LCDC_PANEL_TFT
,
61 .enable
= h3_panel_enable
,
62 .disable
= h3_panel_disable
,
65 static int h3_panel_probe(struct platform_device
*pdev
)
67 omapfb_register_panel(&h3_panel
);
71 static struct platform_driver h3_panel_driver
= {
72 .probe
= h3_panel_probe
,
78 module_platform_driver(h3_panel_driver
);
80 MODULE_AUTHOR("Imre Deak");
81 MODULE_DESCRIPTION("LCD panel support for the TI OMAP H3 board");
82 MODULE_LICENSE("GPL");