lcd_inn1510.c (1544B)
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * LCD panel support for the TI OMAP1510 Innovator board 4 * 5 * Copyright (C) 2004 Nokia Corporation 6 * Author: Imre Deak <imre.deak@nokia.com> 7 */ 8 9#include <linux/module.h> 10#include <linux/platform_device.h> 11#include <linux/io.h> 12 13#include <linux/soc/ti/omap1-soc.h> 14 15#include "omapfb.h" 16 17static void __iomem *omap1510_fpga_lcd_panel_control; 18 19static int innovator1510_panel_enable(struct lcd_panel *panel) 20{ 21 __raw_writeb(0x7, omap1510_fpga_lcd_panel_control); 22 return 0; 23} 24 25static void innovator1510_panel_disable(struct lcd_panel *panel) 26{ 27 __raw_writeb(0x0, omap1510_fpga_lcd_panel_control); 28} 29 30static struct lcd_panel innovator1510_panel = { 31 .name = "inn1510", 32 .config = OMAP_LCDC_PANEL_TFT, 33 34 .bpp = 16, 35 .data_lines = 16, 36 .x_res = 240, 37 .y_res = 320, 38 .pixel_clock = 12500, 39 .hsw = 40, 40 .hfp = 40, 41 .hbp = 72, 42 .vsw = 1, 43 .vfp = 1, 44 .vbp = 0, 45 .pcd = 12, 46 47 .enable = innovator1510_panel_enable, 48 .disable = innovator1510_panel_disable, 49}; 50 51static int innovator1510_panel_probe(struct platform_device *pdev) 52{ 53 omap1510_fpga_lcd_panel_control = (void __iomem *)pdev->dev.platform_data; 54 omapfb_register_panel(&innovator1510_panel); 55 return 0; 56} 57 58static struct platform_driver innovator1510_panel_driver = { 59 .probe = innovator1510_panel_probe, 60 .driver = { 61 .name = "lcd_inn1510", 62 }, 63}; 64 65module_platform_driver(innovator1510_panel_driver); 66 67MODULE_AUTHOR("Imre Deak"); 68MODULE_DESCRIPTION("LCD panel support for the TI OMAP1510 Innovator board"); 69MODULE_LICENSE("GPL");