lcdc_external.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* Copyright (c) 2009-2010, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. #include "msm_fb.h"
  14. static int __init lcdc_external_init(void)
  15. {
  16. int ret;
  17. struct msm_panel_info pinfo;
  18. if (msm_fb_detect_client("lcdc_external"))
  19. return 0;
  20. pinfo.xres = 1280;
  21. pinfo.yres = 720;
  22. MSM_FB_SINGLE_MODE_PANEL(&pinfo);
  23. pinfo.type = LCDC_PANEL;
  24. pinfo.pdest = DISPLAY_1;
  25. pinfo.wait_cycle = 0;
  26. pinfo.bpp = 24;
  27. pinfo.fb_num = 2;
  28. pinfo.clk_rate = 74250000;
  29. pinfo.lcdc.h_back_porch = 124;
  30. pinfo.lcdc.h_front_porch = 110;
  31. pinfo.lcdc.h_pulse_width = 136;
  32. pinfo.lcdc.v_back_porch = 19;
  33. pinfo.lcdc.v_front_porch = 5;
  34. pinfo.lcdc.v_pulse_width = 6;
  35. pinfo.lcdc.border_clr = 0; /* blk */
  36. pinfo.lcdc.underflow_clr = 0xff; /* blue */
  37. pinfo.lcdc.hsync_skew = 0;
  38. ret = lcdc_device_register(&pinfo);
  39. if (ret)
  40. printk(KERN_ERR "%s: failed to register device!\n", __func__);
  41. return ret;
  42. }
  43. module_init(lcdc_external_init);