mddi_toshiba_wvga.c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* Copyright (c) 2009-2010, 2012 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. #include "mddihost.h"
  15. #include "mddi_toshiba.h"
  16. static int __init mddi_toshiba_wvga_init(void)
  17. {
  18. int ret;
  19. struct msm_panel_info pinfo;
  20. #ifdef CONFIG_FB_MSM_MDDI_AUTO_DETECT
  21. if (msm_fb_detect_client("mddi_toshiba_wvga"))
  22. return 0;
  23. #endif
  24. pinfo.xres = 800;
  25. pinfo.yres = 480;
  26. MSM_FB_SINGLE_MODE_PANEL(&pinfo);
  27. pinfo.pdest = DISPLAY_2;
  28. pinfo.type = MDDI_PANEL;
  29. pinfo.mddi.vdopkt = MDDI_DEFAULT_PRIM_PIX_ATTR;
  30. pinfo.wait_cycle = 0;
  31. pinfo.bpp = 18;
  32. pinfo.lcd.vsync_enable = TRUE;
  33. pinfo.mddi.is_type1 = TRUE;
  34. pinfo.lcd.refx100 = 6118;
  35. pinfo.lcd.v_back_porch = 6;
  36. pinfo.lcd.v_front_porch = 0;
  37. pinfo.lcd.v_pulse_width = 0;
  38. pinfo.lcd.hw_vsync_mode = FALSE;
  39. pinfo.lcd.vsync_notifier_period = (1 * HZ);
  40. pinfo.bl_max = 4;
  41. pinfo.bl_min = 1;
  42. pinfo.clk_rate = 192000000;
  43. pinfo.clk_min = 190000000;
  44. pinfo.clk_max = 200000000;
  45. pinfo.fb_num = 2;
  46. ret = mddi_toshiba_device_register(&pinfo, TOSHIBA_VGA_PRIM,
  47. LCD_TOSHIBA_2P4_WVGA);
  48. if (ret) {
  49. printk(KERN_ERR "%s: failed to register device!\n", __func__);
  50. return ret;
  51. }
  52. return ret;
  53. }
  54. module_init(mddi_toshiba_wvga_init);