/drivers/staging/msm/lcdc_prism.c

https://bitbucket.org/slukk/jb-tsm-kernel-4.2 · C · 64 lines · 38 code · 10 blank · 16 comment · 6 complexity · 524ed8a4b7717febbbf32bb496c8193b MD5 · raw file

  1. /* Copyright (c) 2009, Code Aurora Forum. 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. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software
  14. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. * 02110-1301, USA.
  16. */
  17. #include "msm_fb.h"
  18. #ifdef CONFIG_FB_MSM_TRY_MDDI_CATCH_LCDC_PRISM
  19. #include "mddihosti.h"
  20. #endif
  21. static int __init lcdc_prism_init(void)
  22. {
  23. int ret;
  24. struct msm_panel_info pinfo;
  25. #ifdef CONFIG_FB_MSM_TRY_MDDI_CATCH_LCDC_PRISM
  26. ret = msm_fb_detect_client("lcdc_prism_wvga");
  27. if (ret == -ENODEV)
  28. return 0;
  29. if (ret && (mddi_get_client_id() != 0))
  30. return 0;
  31. #endif
  32. pinfo.xres = 800;
  33. pinfo.yres = 480;
  34. pinfo.type = LCDC_PANEL;
  35. pinfo.pdest = DISPLAY_1;
  36. pinfo.wait_cycle = 0;
  37. pinfo.bpp = 24;
  38. pinfo.fb_num = 2;
  39. pinfo.clk_rate = 38460000;
  40. pinfo.lcdc.h_back_porch = 21;
  41. pinfo.lcdc.h_front_porch = 81;
  42. pinfo.lcdc.h_pulse_width = 60;
  43. pinfo.lcdc.v_back_porch = 18;
  44. pinfo.lcdc.v_front_porch = 27;
  45. pinfo.lcdc.v_pulse_width = 2;
  46. pinfo.lcdc.border_clr = 0; /* blk */
  47. pinfo.lcdc.underflow_clr = 0xff; /* blue */
  48. pinfo.lcdc.hsync_skew = 0;
  49. ret = lcdc_device_register(&pinfo);
  50. if (ret)
  51. printk(KERN_ERR "%s: failed to register device!\n", __func__);
  52. return ret;
  53. }
  54. module_init(lcdc_prism_init);