lcd_inn1510.c 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * LCD panel support for the TI OMAP1510 Innovator 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 <linux/io.h>
  24. #include <mach/hardware.h>
  25. #include "omapfb.h"
  26. static int innovator1510_panel_init(struct lcd_panel *panel,
  27. struct omapfb_device *fbdev)
  28. {
  29. return 0;
  30. }
  31. static void innovator1510_panel_cleanup(struct lcd_panel *panel)
  32. {
  33. }
  34. static int innovator1510_panel_enable(struct lcd_panel *panel)
  35. {
  36. __raw_writeb(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL);
  37. return 0;
  38. }
  39. static void innovator1510_panel_disable(struct lcd_panel *panel)
  40. {
  41. __raw_writeb(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL);
  42. }
  43. static unsigned long innovator1510_panel_get_caps(struct lcd_panel *panel)
  44. {
  45. return 0;
  46. }
  47. struct lcd_panel innovator1510_panel = {
  48. .name = "inn1510",
  49. .config = OMAP_LCDC_PANEL_TFT,
  50. .bpp = 16,
  51. .data_lines = 16,
  52. .x_res = 240,
  53. .y_res = 320,
  54. .pixel_clock = 12500,
  55. .hsw = 40,
  56. .hfp = 40,
  57. .hbp = 72,
  58. .vsw = 1,
  59. .vfp = 1,
  60. .vbp = 0,
  61. .pcd = 12,
  62. .init = innovator1510_panel_init,
  63. .cleanup = innovator1510_panel_cleanup,
  64. .enable = innovator1510_panel_enable,
  65. .disable = innovator1510_panel_disable,
  66. .get_caps = innovator1510_panel_get_caps,
  67. };
  68. static int innovator1510_panel_probe(struct platform_device *pdev)
  69. {
  70. omapfb_register_panel(&innovator1510_panel);
  71. return 0;
  72. }
  73. static int innovator1510_panel_remove(struct platform_device *pdev)
  74. {
  75. return 0;
  76. }
  77. static int innovator1510_panel_suspend(struct platform_device *pdev,
  78. pm_message_t mesg)
  79. {
  80. return 0;
  81. }
  82. static int innovator1510_panel_resume(struct platform_device *pdev)
  83. {
  84. return 0;
  85. }
  86. static struct platform_driver innovator1510_panel_driver = {
  87. .probe = innovator1510_panel_probe,
  88. .remove = innovator1510_panel_remove,
  89. .suspend = innovator1510_panel_suspend,
  90. .resume = innovator1510_panel_resume,
  91. .driver = {
  92. .name = "lcd_inn1510",
  93. },
  94. };
  95. module_platform_driver(innovator1510_panel_driver);