1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * LCD panel support for the TI OMAP OSK board
5 * Copyright (C) 2004 Nokia Corporation
6 * Author: Imre Deak <imre.deak@nokia.com>
7 * Adapted for OSK by <dirk.behme@de.bosch.com>
10 #include <linux/module.h>
11 #include <linux/platform_device.h>
12 #include <linux/gpio.h>
14 #include <mach/hardware.h>
19 static int osk_panel_enable(struct lcd_panel
*panel
)
21 /* configure PWL pin */
25 omap_writeb(0x01, OMAP_PWL_CLK_ENABLE
);
28 omap_writeb(0xFF, OMAP_PWL_ENABLE
);
30 /* set GPIO2 high (lcd power enabled) */
36 static void osk_panel_disable(struct lcd_panel
*panel
)
38 /* Set PWL level to zero */
39 omap_writeb(0x00, OMAP_PWL_ENABLE
);
41 /* Disable PWL unit */
42 omap_writeb(0x00, OMAP_PWL_CLK_ENABLE
);
48 static struct lcd_panel osk_panel
= {
50 .config
= OMAP_LCDC_PANEL_TFT
,
65 .enable
= osk_panel_enable
,
66 .disable
= osk_panel_disable
,
69 static int osk_panel_probe(struct platform_device
*pdev
)
71 omapfb_register_panel(&osk_panel
);
75 static struct platform_driver osk_panel_driver
= {
76 .probe
= osk_panel_probe
,
82 module_platform_driver(osk_panel_driver
);
84 MODULE_AUTHOR("Imre Deak");
85 MODULE_DESCRIPTION("LCD panel support for the TI OMAP OSK board");
86 MODULE_LICENSE("GPL");