lcd_palmtt.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 <linux/gpio.h>
  30. #include "omapfb.h"
  31. static unsigned long palmtt_panel_get_caps(struct lcd_panel *panel)
  32. {
  33. return OMAPFB_CAPS_SET_BACKLIGHT;
  34. }
  35. static struct lcd_panel palmtt_panel = {
  36. .name = "palmtt",
  37. .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
  38. OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
  39. OMAP_LCDC_HSVS_OPPOSITE,
  40. .bpp = 16,
  41. .data_lines = 16,
  42. .x_res = 320,
  43. .y_res = 320,
  44. .pixel_clock = 10000,
  45. .hsw = 4,
  46. .hfp = 8,
  47. .hbp = 28,
  48. .vsw = 1,
  49. .vfp = 8,
  50. .vbp = 7,
  51. .pcd = 0,
  52. .get_caps = palmtt_panel_get_caps,
  53. };
  54. static int palmtt_panel_probe(struct platform_device *pdev)
  55. {
  56. omapfb_register_panel(&palmtt_panel);
  57. return 0;
  58. }
  59. static struct platform_driver palmtt_panel_driver = {
  60. .probe = palmtt_panel_probe,
  61. .driver = {
  62. .name = "lcd_palmtt",
  63. },
  64. };
  65. module_platform_driver(palmtt_panel_driver);
  66. MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
  67. MODULE_DESCRIPTION("LCD panel support for Palm Tungsten|T");
  68. MODULE_LICENSE("GPL");