lcd_h4.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * LCD panel support for the TI OMAP H4 board
  3. *
  4. * Copyright (C) 2004 Nokia Corporation
  5. * Author: Imre Deak <imre.deak@nokia.com>
  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 <mach/omapfb.h>
  24. static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
  25. {
  26. return 0;
  27. }
  28. static void h4_panel_cleanup(struct lcd_panel *panel)
  29. {
  30. }
  31. static int h4_panel_enable(struct lcd_panel *panel)
  32. {
  33. return 0;
  34. }
  35. static void h4_panel_disable(struct lcd_panel *panel)
  36. {
  37. }
  38. static unsigned long h4_panel_get_caps(struct lcd_panel *panel)
  39. {
  40. return 0;
  41. }
  42. struct lcd_panel h4_panel = {
  43. .name = "h4",
  44. .config = OMAP_LCDC_PANEL_TFT,
  45. .bpp = 16,
  46. .data_lines = 16,
  47. .x_res = 240,
  48. .y_res = 320,
  49. .pixel_clock = 6250,
  50. .hsw = 15,
  51. .hfp = 15,
  52. .hbp = 60,
  53. .vsw = 1,
  54. .vfp = 1,
  55. .vbp = 1,
  56. .init = h4_panel_init,
  57. .cleanup = h4_panel_cleanup,
  58. .enable = h4_panel_enable,
  59. .disable = h4_panel_disable,
  60. .get_caps = h4_panel_get_caps,
  61. };
  62. static int h4_panel_probe(struct platform_device *pdev)
  63. {
  64. omapfb_register_panel(&h4_panel);
  65. return 0;
  66. }
  67. static int h4_panel_remove(struct platform_device *pdev)
  68. {
  69. return 0;
  70. }
  71. static int h4_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
  72. {
  73. return 0;
  74. }
  75. static int h4_panel_resume(struct platform_device *pdev)
  76. {
  77. return 0;
  78. }
  79. struct platform_driver h4_panel_driver = {
  80. .probe = h4_panel_probe,
  81. .remove = h4_panel_remove,
  82. .suspend = h4_panel_suspend,
  83. .resume = h4_panel_resume,
  84. .driver = {
  85. .name = "lcd_h4",
  86. .owner = THIS_MODULE,
  87. },
  88. };
  89. static int h4_panel_drv_init(void)
  90. {
  91. return platform_driver_register(&h4_panel_driver);
  92. }
  93. static void h4_panel_drv_cleanup(void)
  94. {
  95. platform_driver_unregister(&h4_panel_driver);
  96. }
  97. module_init(h4_panel_drv_init);
  98. module_exit(h4_panel_drv_cleanup);