lcd_palmz71.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. * LCD panel support for the Palm Zire71
  3. *
  4. * Original version : Romain Goyet
  5. * Current version : Laurent Gonzalez
  6. * Modified for zire71 : Marek Vasut
  7. *
  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.
  12. *
  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.
  17. *
  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.
  21. */
  22. #include <linux/module.h>
  23. #include <linux/platform_device.h>
  24. #include <linux/io.h>
  25. #include "omapfb.h"
  26. static int palmz71_panel_init(struct lcd_panel *panel,
  27. struct omapfb_device *fbdev)
  28. {
  29. return 0;
  30. }
  31. static void palmz71_panel_cleanup(struct lcd_panel *panel)
  32. {
  33. }
  34. static int palmz71_panel_enable(struct lcd_panel *panel)
  35. {
  36. return 0;
  37. }
  38. static void palmz71_panel_disable(struct lcd_panel *panel)
  39. {
  40. }
  41. static unsigned long palmz71_panel_get_caps(struct lcd_panel *panel)
  42. {
  43. return OMAPFB_CAPS_SET_BACKLIGHT;
  44. }
  45. struct lcd_panel palmz71_panel = {
  46. .name = "palmz71",
  47. .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
  48. OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
  49. OMAP_LCDC_HSVS_OPPOSITE,
  50. .data_lines = 16,
  51. .bpp = 16,
  52. .pixel_clock = 24000,
  53. .x_res = 320,
  54. .y_res = 320,
  55. .hsw = 4,
  56. .hfp = 8,
  57. .hbp = 28,
  58. .vsw = 1,
  59. .vfp = 8,
  60. .vbp = 7,
  61. .pcd = 0,
  62. .init = palmz71_panel_init,
  63. .cleanup = palmz71_panel_cleanup,
  64. .enable = palmz71_panel_enable,
  65. .disable = palmz71_panel_disable,
  66. .get_caps = palmz71_panel_get_caps,
  67. };
  68. static int palmz71_panel_probe(struct platform_device *pdev)
  69. {
  70. omapfb_register_panel(&palmz71_panel);
  71. return 0;
  72. }
  73. static int palmz71_panel_remove(struct platform_device *pdev)
  74. {
  75. return 0;
  76. }
  77. static int palmz71_panel_suspend(struct platform_device *pdev,
  78. pm_message_t mesg)
  79. {
  80. return 0;
  81. }
  82. static int palmz71_panel_resume(struct platform_device *pdev)
  83. {
  84. return 0;
  85. }
  86. struct platform_driver palmz71_panel_driver = {
  87. .probe = palmz71_panel_probe,
  88. .remove = palmz71_panel_remove,
  89. .suspend = palmz71_panel_suspend,
  90. .resume = palmz71_panel_resume,
  91. .driver = {
  92. .name = "lcd_palmz71",
  93. .owner = THIS_MODULE,
  94. },
  95. };
  96. static int __init palmz71_panel_drv_init(void)
  97. {
  98. return platform_driver_register(&palmz71_panel_driver);
  99. }
  100. static void __exit palmz71_panel_drv_cleanup(void)
  101. {
  102. platform_driver_unregister(&palmz71_panel_driver);
  103. }
  104. module_init(palmz71_panel_drv_init);
  105. module_exit(palmz71_panel_drv_cleanup);