lcd_palmte.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. * LCD panel support for the Palm Tungsten E
  3. *
  4. * Original version : Romain Goyet <r.goyet@gmail.com>
  5. * Current version : Laurent Gonzalez <palmte.linux@free.fr>
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation; either version 2 of the License, or (at your
  10. * option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program; if not, write to the Free Software Foundation, Inc.,
  19. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20. */
  21. #include <linux/module.h>
  22. #include <linux/platform_device.h>
  23. #include <linux/io.h>
  24. #include <plat/fpga.h>
  25. #include "omapfb.h"
  26. static int palmte_panel_init(struct lcd_panel *panel,
  27. struct omapfb_device *fbdev)
  28. {
  29. return 0;
  30. }
  31. static void palmte_panel_cleanup(struct lcd_panel *panel)
  32. {
  33. }
  34. static int palmte_panel_enable(struct lcd_panel *panel)
  35. {
  36. return 0;
  37. }
  38. static void palmte_panel_disable(struct lcd_panel *panel)
  39. {
  40. }
  41. static unsigned long palmte_panel_get_caps(struct lcd_panel *panel)
  42. {
  43. return 0;
  44. }
  45. struct lcd_panel palmte_panel = {
  46. .name = "palmte",
  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 = 8,
  52. .pixel_clock = 12000,
  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 = palmte_panel_init,
  63. .cleanup = palmte_panel_cleanup,
  64. .enable = palmte_panel_enable,
  65. .disable = palmte_panel_disable,
  66. .get_caps = palmte_panel_get_caps,
  67. };
  68. static int palmte_panel_probe(struct platform_device *pdev)
  69. {
  70. omapfb_register_panel(&palmte_panel);
  71. return 0;
  72. }
  73. static int palmte_panel_remove(struct platform_device *pdev)
  74. {
  75. return 0;
  76. }
  77. static int palmte_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
  78. {
  79. return 0;
  80. }
  81. static int palmte_panel_resume(struct platform_device *pdev)
  82. {
  83. return 0;
  84. }
  85. struct platform_driver palmte_panel_driver = {
  86. .probe = palmte_panel_probe,
  87. .remove = palmte_panel_remove,
  88. .suspend = palmte_panel_suspend,
  89. .resume = palmte_panel_resume,
  90. .driver = {
  91. .name = "lcd_palmte",
  92. .owner = THIS_MODULE,
  93. },
  94. };
  95. static int __init palmte_panel_drv_init(void)
  96. {
  97. return platform_driver_register(&palmte_panel_driver);
  98. }
  99. static void __exit palmte_panel_drv_cleanup(void)
  100. {
  101. platform_driver_unregister(&palmte_panel_driver);
  102. }
  103. module_init(palmte_panel_drv_init);
  104. module_exit(palmte_panel_drv_cleanup);