lcd_palmtt.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * LCD panel support for Palm Tungsten|T
  4. * Current version : Marek Vasut <[email protected]>
  5. *
  6. * Modified from lcd_inn1510.c
  7. */
  8. /*
  9. GPIO11 - backlight
  10. GPIO12 - screen blanking
  11. GPIO13 - screen blanking
  12. */
  13. #include <linux/platform_device.h>
  14. #include <linux/module.h>
  15. #include <linux/io.h>
  16. #include <linux/gpio.h>
  17. #include "omapfb.h"
  18. static unsigned long palmtt_panel_get_caps(struct lcd_panel *panel)
  19. {
  20. return OMAPFB_CAPS_SET_BACKLIGHT;
  21. }
  22. static struct lcd_panel palmtt_panel = {
  23. .name = "palmtt",
  24. .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
  25. OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
  26. OMAP_LCDC_HSVS_OPPOSITE,
  27. .bpp = 16,
  28. .data_lines = 16,
  29. .x_res = 320,
  30. .y_res = 320,
  31. .pixel_clock = 10000,
  32. .hsw = 4,
  33. .hfp = 8,
  34. .hbp = 28,
  35. .vsw = 1,
  36. .vfp = 8,
  37. .vbp = 7,
  38. .pcd = 0,
  39. .get_caps = palmtt_panel_get_caps,
  40. };
  41. static int palmtt_panel_probe(struct platform_device *pdev)
  42. {
  43. omapfb_register_panel(&palmtt_panel);
  44. return 0;
  45. }
  46. static struct platform_driver palmtt_panel_driver = {
  47. .probe = palmtt_panel_probe,
  48. .driver = {
  49. .name = "lcd_palmtt",
  50. },
  51. };
  52. module_platform_driver(palmtt_panel_driver);
  53. MODULE_AUTHOR("Marek Vasut <[email protected]>");
  54. MODULE_DESCRIPTION("LCD panel support for Palm Tungsten|T");
  55. MODULE_LICENSE("GPL");