lcd_palmtt.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * LCD panel support for Palm Tungsten|T
  3. * Current version : Marek Vasut <marek.vasut@gmail.com>
  4. *
  5. * Modified from lcd_inn1510.c
  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. /*
  22. GPIO11 - backlight
  23. GPIO12 - screen blanking
  24. GPIO13 - screen blanking
  25. */
  26. #include <linux/platform_device.h>
  27. #include <linux/module.h>
  28. #include <linux/io.h>
  29. #include <asm/gpio.h>
  30. #include "omapfb.h"
  31. static int palmtt_panel_init(struct lcd_panel *panel,
  32. struct omapfb_device *fbdev)
  33. {
  34. return 0;
  35. }
  36. static void palmtt_panel_cleanup(struct lcd_panel *panel)
  37. {
  38. }
  39. static int palmtt_panel_enable(struct lcd_panel *panel)
  40. {
  41. return 0;
  42. }
  43. static void palmtt_panel_disable(struct lcd_panel *panel)
  44. {
  45. }
  46. static unsigned long palmtt_panel_get_caps(struct lcd_panel *panel)
  47. {
  48. return OMAPFB_CAPS_SET_BACKLIGHT;
  49. }
  50. struct lcd_panel palmtt_panel = {
  51. .name = "palmtt",
  52. .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
  53. OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
  54. OMAP_LCDC_HSVS_OPPOSITE,
  55. .bpp = 16,
  56. .data_lines = 16,
  57. .x_res = 320,
  58. .y_res = 320,
  59. .pixel_clock = 10000,
  60. .hsw = 4,
  61. .hfp = 8,
  62. .hbp = 28,
  63. .vsw = 1,
  64. .vfp = 8,
  65. .vbp = 7,
  66. .pcd = 0,
  67. .init = palmtt_panel_init,
  68. .cleanup = palmtt_panel_cleanup,
  69. .enable = palmtt_panel_enable,
  70. .disable = palmtt_panel_disable,
  71. .get_caps = palmtt_panel_get_caps,
  72. };
  73. static int palmtt_panel_probe(struct platform_device *pdev)
  74. {
  75. omapfb_register_panel(&palmtt_panel);
  76. return 0;
  77. }
  78. static int palmtt_panel_remove(struct platform_device *pdev)
  79. {
  80. return 0;
  81. }
  82. static int palmtt_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
  83. {
  84. return 0;
  85. }
  86. static int palmtt_panel_resume(struct platform_device *pdev)
  87. {
  88. return 0;
  89. }
  90. static struct platform_driver palmtt_panel_driver = {
  91. .probe = palmtt_panel_probe,
  92. .remove = palmtt_panel_remove,
  93. .suspend = palmtt_panel_suspend,
  94. .resume = palmtt_panel_resume,
  95. .driver = {
  96. .name = "lcd_palmtt",
  97. },
  98. };
  99. module_platform_driver(palmtt_panel_driver);