2  * LCD panel support for the Palm Zire71
 
   4  * Original version : Romain Goyet
 
   5  * Current version : Laurent Gonzalez
 
   6  * Modified for zire71 : Marek Vasut
 
   8  * This program is free software; you can redistribute it and/or modify it
 
   9  * under the terms of the GNU General Public License as published by the
 
  10  * Free Software Foundation; either version 2 of the License, or (at your
 
  11  * option) any later version.
 
  13  * This program is distributed in the hope that it will be useful, but
 
  14  * WITHOUT ANY WARRANTY; without even the implied warranty of
 
  15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
  16  * General Public License for more details.
 
  18  * You should have received a copy of the GNU General Public License along
 
  19  * with this program; if not, write to the Free Software Foundation, Inc.,
 
  20  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
  23 #include <linux/module.h>
 
  24 #include <linux/platform_device.h>
 
  27 #include <mach/omapfb.h>
 
  29 static int palmz71_panel_init(struct lcd_panel *panel,
 
  30                               struct omapfb_device *fbdev)
 
  35 static void palmz71_panel_cleanup(struct lcd_panel *panel)
 
  40 static int palmz71_panel_enable(struct lcd_panel *panel)
 
  45 static void palmz71_panel_disable(struct lcd_panel *panel)
 
  49 static unsigned long palmz71_panel_get_caps(struct lcd_panel *panel)
 
  51         return OMAPFB_CAPS_SET_BACKLIGHT;
 
  54 struct lcd_panel palmz71_panel = {
 
  56         .config         = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
 
  57                           OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
 
  58                           OMAP_LCDC_HSVS_OPPOSITE,
 
  72         .init           = palmz71_panel_init,
 
  73         .cleanup        = palmz71_panel_cleanup,
 
  74         .enable         = palmz71_panel_enable,
 
  75         .disable        = palmz71_panel_disable,
 
  76         .get_caps       = palmz71_panel_get_caps,
 
  79 static int palmz71_panel_probe(struct platform_device *pdev)
 
  81         omapfb_register_panel(&palmz71_panel);
 
  85 static int palmz71_panel_remove(struct platform_device *pdev)
 
  90 static int palmz71_panel_suspend(struct platform_device *pdev,
 
  96 static int palmz71_panel_resume(struct platform_device *pdev)
 
 101 struct platform_driver palmz71_panel_driver = {
 
 102         .probe          = palmz71_panel_probe,
 
 103         .remove         = palmz71_panel_remove,
 
 104         .suspend        = palmz71_panel_suspend,
 
 105         .resume         = palmz71_panel_resume,
 
 107                 .name   = "lcd_palmz71",
 
 108                 .owner  = THIS_MODULE,
 
 112 static int palmz71_panel_drv_init(void)
 
 114         return platform_driver_register(&palmz71_panel_driver);
 
 117 static void palmz71_panel_drv_cleanup(void)
 
 119         platform_driver_unregister(&palmz71_panel_driver);
 
 122 module_init(palmz71_panel_drv_init);
 
 123 module_exit(palmz71_panel_drv_cleanup);