lcd_apollon.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * LCD panel support for the Samsung OMAP2 Apollon board
  3. *
  4. * Copyright (C) 2005,2006 Samsung Electronics
  5. * Author: Kyungmin Park <kyungmin.park@samsung.com>
  6. *
  7. * Derived from drivers/video/omap/lcd-h4.c
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the
  11. * Free Software Foundation; either version 2 of the License, or (at your
  12. * option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful, but
  15. * WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License along
  20. * with this program; if not, write to the Free Software Foundation, Inc.,
  21. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22. */
  23. #include <linux/module.h>
  24. #include <linux/platform_device.h>
  25. #include <mach/gpio.h>
  26. #include "omapfb.h"
  27. /* #define USE_35INCH_LCD 1 */
  28. static int apollon_panel_init(struct lcd_panel *panel,
  29. struct omapfb_device *fbdev)
  30. {
  31. return 0;
  32. }
  33. static void apollon_panel_cleanup(struct lcd_panel *panel)
  34. {
  35. }
  36. static int apollon_panel_enable(struct lcd_panel *panel)
  37. {
  38. return 0;
  39. }
  40. static void apollon_panel_disable(struct lcd_panel *panel)
  41. {
  42. }
  43. static unsigned long apollon_panel_get_caps(struct lcd_panel *panel)
  44. {
  45. return 0;
  46. }
  47. struct lcd_panel apollon_panel = {
  48. .name = "apollon",
  49. .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
  50. OMAP_LCDC_INV_HSYNC,
  51. .bpp = 16,
  52. .data_lines = 18,
  53. #ifdef USE_35INCH_LCD
  54. .x_res = 240,
  55. .y_res = 320,
  56. .hsw = 2,
  57. .hfp = 3,
  58. .hbp = 9,
  59. .vsw = 4,
  60. .vfp = 3,
  61. .vbp = 5,
  62. #else
  63. .x_res = 480,
  64. .y_res = 272,
  65. .hsw = 41,
  66. .hfp = 2,
  67. .hbp = 2,
  68. .vsw = 10,
  69. .vfp = 2,
  70. .vbp = 2,
  71. #endif
  72. .pixel_clock = 6250,
  73. .init = apollon_panel_init,
  74. .cleanup = apollon_panel_cleanup,
  75. .enable = apollon_panel_enable,
  76. .disable = apollon_panel_disable,
  77. .get_caps = apollon_panel_get_caps,
  78. };
  79. static int apollon_panel_probe(struct platform_device *pdev)
  80. {
  81. omapfb_register_panel(&apollon_panel);
  82. return 0;
  83. }
  84. static int apollon_panel_remove(struct platform_device *pdev)
  85. {
  86. return 0;
  87. }
  88. static int apollon_panel_suspend(struct platform_device *pdev,
  89. pm_message_t mesg)
  90. {
  91. return 0;
  92. }
  93. static int apollon_panel_resume(struct platform_device *pdev)
  94. {
  95. return 0;
  96. }
  97. struct platform_driver apollon_panel_driver = {
  98. .probe = apollon_panel_probe,
  99. .remove = apollon_panel_remove,
  100. .suspend = apollon_panel_suspend,
  101. .resume = apollon_panel_resume,
  102. .driver = {
  103. .name = "apollon_lcd",
  104. .owner = THIS_MODULE,
  105. },
  106. };
  107. static int __init apollon_panel_drv_init(void)
  108. {
  109. return platform_driver_register(&apollon_panel_driver);
  110. }
  111. static void __exit apollon_panel_drv_exit(void)
  112. {
  113. platform_driver_unregister(&apollon_panel_driver);
  114. }
  115. module_init(apollon_panel_drv_init);
  116. module_exit(apollon_panel_drv_exit);