lcd_inn1510.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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_enable(struct lcd_panel *panel)
  27. {
  28. __raw_writeb(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL);
  29. return 0;
  30. }
  31. static void innovator1510_panel_disable(struct lcd_panel *panel)
  32. {
  33. __raw_writeb(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL);
  34. }
  35. static struct lcd_panel innovator1510_panel = {
  36. .name = "inn1510",
  37. .config = OMAP_LCDC_PANEL_TFT,
  38. .bpp = 16,
  39. .data_lines = 16,
  40. .x_res = 240,
  41. .y_res = 320,
  42. .pixel_clock = 12500,
  43. .hsw = 40,
  44. .hfp = 40,
  45. .hbp = 72,
  46. .vsw = 1,
  47. .vfp = 1,
  48. .vbp = 0,
  49. .pcd = 12,
  50. .enable = innovator1510_panel_enable,
  51. .disable = innovator1510_panel_disable,
  52. };
  53. static int innovator1510_panel_probe(struct platform_device *pdev)
  54. {
  55. omapfb_register_panel(&innovator1510_panel);
  56. return 0;
  57. }
  58. static struct platform_driver innovator1510_panel_driver = {
  59. .probe = innovator1510_panel_probe,
  60. .driver = {
  61. .name = "lcd_inn1510",
  62. },
  63. };
  64. module_platform_driver(innovator1510_panel_driver);
  65. MODULE_AUTHOR("Imre Deak");
  66. MODULE_DESCRIPTION("LCD panel support for the TI OMAP1510 Innovator board");
  67. MODULE_LICENSE("GPL");