lcdc_prism.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #ifdef CONFIG_FB_MSM_TRY_MDDI_CATCH_LCDC_PRISM
  15. #include "mddihosti.h"
  16. #endif
  17. static int __init lcdc_prism_init(void)
  18. {
  19. int ret;
  20. struct msm_panel_info pinfo;
  21. #ifdef CONFIG_FB_MSM_TRY_MDDI_CATCH_LCDC_PRISM
  22. ret = msm_fb_detect_client("lcdc_prism_wvga");
  23. if (ret == -ENODEV)
  24. return 0;
  25. if (ret && (mddi_get_client_id() != 0))
  26. return 0;
  27. #endif
  28. pinfo.xres = 800;
  29. pinfo.yres = 480;
  30. MSM_FB_SINGLE_MODE_PANEL(&pinfo);
  31. pinfo.type = LCDC_PANEL;
  32. pinfo.pdest = DISPLAY_1;
  33. pinfo.wait_cycle = 0;
  34. pinfo.bpp = 24;
  35. pinfo.fb_num = 2;
  36. pinfo.clk_rate = 30720000;
  37. pinfo.lcdc.h_back_porch = 21;
  38. pinfo.lcdc.h_front_porch = 81;
  39. pinfo.lcdc.h_pulse_width = 60;
  40. pinfo.lcdc.v_back_porch = 18;
  41. pinfo.lcdc.v_front_porch = 27;
  42. pinfo.lcdc.v_pulse_width = 2;
  43. pinfo.lcdc.border_clr = 0; /* blk */
  44. pinfo.lcdc.underflow_clr = 0xff; /* blue */
  45. pinfo.lcdc.hsync_skew = 0;
  46. ret = lcdc_device_register(&pinfo);
  47. if (ret)
  48. printk(KERN_ERR "%s: failed to register device!\n", __func__);
  49. return ret;
  50. }
  51. module_init(lcdc_prism_init);