mdss_hx8369b_panel.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /* Copyright (c) 2008-2013, 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. #ifndef MDSS_HX8369B_PANEL_H
  14. #define MDSS_HX8369B_PANEL_H
  15. #include "mdss_panel.h"
  16. #define MAX_BRIGHTNESS_LEVEL 255
  17. #define MID_BRIGHTNESS_LEVEL 143
  18. #define LOW_BRIGHTNESS_LEVEL 20
  19. #define DIM_BRIGHTNESS_LEVEL 30
  20. #define MAX_BRIGHTNESS_IN_BLU 32
  21. #if defined(CONFIG_BACKLIGHT_IC_KTD2801)
  22. #define BL_MIN_BRIGHTNESS 1
  23. #define BL_MAX_BRIGHTNESS_LEVEL 105
  24. #define BL_MID_BRIGHTNESS_LEVEL 45
  25. #define BL_LOW_BRIGHTNESS_LEVEL 1
  26. #define BL_DIM_BRIGHTNESS_LEVEL 3
  27. #define BL_DEFAULT_BRIGHTNESS BL_MID_BRIGHTNESS_LEVEL
  28. #else
  29. #define BL_MIN_BRIGHTNESS 6
  30. #define BL_MAX_BRIGHTNESS_LEVEL 192
  31. #define BL_MID_BRIGHTNESS_LEVEL 94
  32. #define BL_LOW_BRIGHTNESS_LEVEL 7
  33. #define BL_DIM_BRIGHTNESS_LEVEL 13
  34. #define BL_DEFAULT_BRIGHTNESS BL_MID_BRIGHTNESS_LEVEL
  35. #endif
  36. enum mipi_samsung_cmd_list {
  37. PANEL_READY_TO_ON_FAST,
  38. PANEL_READY_TO_ON,
  39. PANEL_READY_TO_OFF,
  40. PANEL_ON,
  41. PANEL_OFF,
  42. PANEL_LATE_ON,
  43. PANEL_EARLY_OFF,
  44. PANEL_GAMMA_UPDATE,
  45. PANEL_ELVSS_UPDATE,
  46. PANEL_ACL_ON,
  47. PANEL_ACL_OFF,
  48. PANEL_ACL_UPDATE,
  49. MTP_READ_ENABLE,
  50. PANEL_BRIGHT_CTRL,
  51. };
  52. enum {
  53. MIPI_RESUME_STATE,
  54. MIPI_SUSPEND_STATE,
  55. };
  56. struct display_status{
  57. unsigned char auto_brightness;
  58. int bright_level;
  59. int siop_status;
  60. unsigned char acl_on;
  61. };
  62. struct mdss_samsung_driver_data{
  63. struct dsi_buf samsung_tx_buf;
  64. struct msm_fb_data_type *mfd;
  65. struct dsi_buf samsung_rx_buf;
  66. struct mdss_panel_common_pdata *mdss_samsung_disp_pdata;
  67. struct mdss_panel_data *mpd;
  68. struct mdss_dsi_ctrl_pdata *ctrl_pdata;
  69. struct mutex lock;
  70. int bl_level;
  71. #if defined(CONFIG_BACKLIGHT_IC_KTD2801)
  72. int bl_ap_pwm;
  73. #endif
  74. #if defined(CONFIG_LCD_CLASS_DEVICE)
  75. struct platform_device *msm_pdev;
  76. #endif
  77. #if defined(CONFIG_HAS_EARLYSUSPEND)
  78. struct early_suspend early_suspend;
  79. #endif
  80. struct display_status dstat;
  81. };
  82. void mdnie_lite_tuning_init(struct mdss_samsung_driver_data* msd);
  83. void mdss_dsi_cmds_send(struct mdss_dsi_ctrl_pdata *ctrl, struct dsi_cmd_desc *cmds, int cnt,int flag);
  84. #endif