/* * File: drivers/video/omap/lcd_herald.c * * LCD panel support for the HTC Herald phone * * Authors: * Philipp Zabel <philipp.zabel@gmail.com> * * Based on the lcd_p2.c file * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */#include <linux/module.h>#include <linux/delay.h>#include <linux/platform_device.h>#include <asm/arch/mux.h>#include <asm/arch/gpio.h>#include <asm/arch/omapfb.h>static int herald_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev){ return 0;}static void herald_panel_cleanup(struct lcd_panel *panel){}static int herald_panel_enable(struct lcd_panel *panel){ return 0;}static void herald_panel_disable(struct lcd_panel *panel){}static unsigned long herald_panel_get_caps(struct lcd_panel *panel){ return 0;}static int herald_set_bklight_level(struct lcd_panel *panel, unsigned int level){ return(0);}static unsigned int herald_get_bklight_level(struct lcd_panel *panel){ return(0);}static unsigned int herald_get_bklight_max(struct lcd_panel *panel){ return(0);}static struct lcd_panel herald_sony_panel = { .name = "herald-sony", .x_res = 240, .y_res = 320, .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC | OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE | OMAP_LCDC_HSVS_OPPOSITE, .pixel_clock = 6500, .hsw = 4, .hfp = 2, .hbp = 10, .vsw = 2, .vfp = 8, .vbp = 4,};static int herald_panel_probe(struct platform_device *pdev){ struct lcd_panel *panel = &herald_sony_panel; panel->bpp = 16; panel->data_lines = 16; /* common callbacks */ panel->init = herald_panel_init; panel->cleanup = herald_panel_cleanup; panel->enable = herald_panel_enable; panel->disable = herald_panel_disable; panel->get_caps= herald_panel_get_caps; panel->set_bklight_level = herald_set_bklight_level; panel->get_bklight_level = herald_get_bklight_level; panel->get_bklight_max = herald_get_bklight_max; omapfb_register_panel(panel); return 0;}static int herald_panel_remove(struct platform_device *pdev){ return 0;}static int herald_panel_suspend(struct platform_device *pdev, pm_message_t mesg){ return 0;}static int herald_panel_resume(struct platform_device *pdev){ return 0;}struct platform_driver herald_panel_driver = { .probe = herald_panel_probe, .remove = herald_panel_remove, .suspend = herald_panel_suspend, .resume = herald_panel_resume, .driver = { .name = "lcd_herald", .owner = THIS_MODULE, },};static int herald_panel_drv_init(void){ return platform_driver_register(&herald_panel_driver);}static void herald_panel_drv_cleanup(void){ platform_driver_unregister(&herald_panel_driver);}module_init(herald_panel_drv_init);module_exit(herald_panel_drv_cleanup);