lcd_htcherald.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /*
  2. * File: drivers/video/omap/lcd-htcherald.c
  3. *
  4. * LCD panel support for the HTC Herald
  5. *
  6. * Copyright (C) 2009 Cory Maccarrone <darkstar6262@gmail.com>
  7. * Copyright (C) 2009 Wing Linux
  8. *
  9. * Based on the lcd_htcwizard.c file from the linwizard project:
  10. * Copyright (C) linwizard.sourceforge.net
  11. * Author: Angelo Arrifano <miknix@gmail.com>
  12. * Based on lcd_h4 by Imre Deak <imre.deak@nokia.com>
  13. *
  14. * This program is free software; you can redistribute it and/or modify it
  15. * under the terms of the GNU General Public License as published by the
  16. * Free Software Foundation; either version 2 of the License, or (at your
  17. * option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful, but
  20. * WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  22. * General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License along
  25. * with this program; if not, write to the Free Software Foundation, Inc.,
  26. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  27. */
  28. #include <linux/module.h>
  29. #include <linux/platform_device.h>
  30. #include "omapfb.h"
  31. static int htcherald_panel_init(struct lcd_panel *panel,
  32. struct omapfb_device *fbdev)
  33. {
  34. return 0;
  35. }
  36. static void htcherald_panel_cleanup(struct lcd_panel *panel)
  37. {
  38. }
  39. static int htcherald_panel_enable(struct lcd_panel *panel)
  40. {
  41. return 0;
  42. }
  43. static void htcherald_panel_disable(struct lcd_panel *panel)
  44. {
  45. }
  46. static unsigned long htcherald_panel_get_caps(struct lcd_panel *panel)
  47. {
  48. return 0;
  49. }
  50. /* Found on WIZ200 (miknix) and some HERA110 models (darkstar62) */
  51. struct lcd_panel htcherald_panel_1 = {
  52. .name = "lcd_herald",
  53. .config = OMAP_LCDC_PANEL_TFT |
  54. OMAP_LCDC_INV_HSYNC |
  55. OMAP_LCDC_INV_VSYNC |
  56. OMAP_LCDC_INV_PIX_CLOCK,
  57. .bpp = 16,
  58. .data_lines = 16,
  59. .x_res = 240,
  60. .y_res = 320,
  61. .pixel_clock = 6093,
  62. .pcd = 0, /* 15 */
  63. .hsw = 10,
  64. .hfp = 10,
  65. .hbp = 20,
  66. .vsw = 3,
  67. .vfp = 2,
  68. .vbp = 2,
  69. .init = htcherald_panel_init,
  70. .cleanup = htcherald_panel_cleanup,
  71. .enable = htcherald_panel_enable,
  72. .disable = htcherald_panel_disable,
  73. .get_caps = htcherald_panel_get_caps,
  74. };
  75. static int htcherald_panel_probe(struct platform_device *pdev)
  76. {
  77. omapfb_register_panel(&htcherald_panel_1);
  78. return 0;
  79. }
  80. static int htcherald_panel_remove(struct platform_device *pdev)
  81. {
  82. return 0;
  83. }
  84. static int htcherald_panel_suspend(struct platform_device *pdev,
  85. pm_message_t mesg)
  86. {
  87. return 0;
  88. }
  89. static int htcherald_panel_resume(struct platform_device *pdev)
  90. {
  91. return 0;
  92. }
  93. struct platform_driver htcherald_panel_driver = {
  94. .probe = htcherald_panel_probe,
  95. .remove = htcherald_panel_remove,
  96. .suspend = htcherald_panel_suspend,
  97. .resume = htcherald_panel_resume,
  98. .driver = {
  99. .name = "lcd_htcherald",
  100. .owner = THIS_MODULE,
  101. },
  102. };
  103. static int __init htcherald_panel_drv_init(void)
  104. {
  105. return platform_driver_register(&htcherald_panel_driver);
  106. }
  107. static void __exit htcherald_panel_drv_cleanup(void)
  108. {
  109. platform_driver_unregister(&htcherald_panel_driver);
  110. }
  111. module_init(htcherald_panel_drv_init);
  112. module_exit(htcherald_panel_drv_cleanup);