synaptics_rmi.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (c) 2011, 2012 Synaptics Incorporated
  3. * Copyright (c) 2011 Unixphere
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. *
  19. */
  20. #ifndef _SYNAPTICS_RMI4_GENERIC_H_
  21. #define _SYNAPTICS_RMI4_GENERIC_H_
  22. #undef SYNAPTICS_RMI_INFORM_CHARGER
  23. #ifdef SYNAPTICS_RMI_INFORM_CHARGER
  24. struct synaptics_rmi_callbacks {
  25. void (*inform_charger)(struct synaptics_rmi_callbacks *, int);
  26. };
  27. #endif
  28. struct synaptics_rmi4_power_data {
  29. int vdd_io_1p8;
  30. int tsp_int;
  31. };
  32. /**
  33. * struct synaptics_rmi4_platform_data - rmi4 platform data
  34. * @x_flip: x flip flag
  35. * @y_flip: y flip flag
  36. * @regulator_en: regulator enable flag
  37. * @gpio: attention interrupt gpio
  38. * @irq_type: irq type
  39. * @gpio_config: pointer to gpio configuration function
  40. * @f1a_button_map: pointer to 0d button map
  41. */
  42. struct synaptics_rmi4_platform_data {
  43. bool x_flip;
  44. bool y_flip;
  45. unsigned int sensor_max_x;
  46. unsigned int sensor_max_y;
  47. unsigned char max_touch_width;
  48. unsigned char panel_revision; /* to identify panel info */
  49. bool regulator_en;
  50. unsigned gpio;
  51. int irq_type;
  52. int (*gpio_config)(unsigned interrupt_gpio, bool configure);
  53. int tsppwr_1p8_en;
  54. void (*enable_sync)(bool on);
  55. const char *firmware_name;
  56. const char *fac_firmware_name;
  57. int num_of_rx;
  58. int num_of_tx;
  59. /* use H project, S5050 driver */
  60. bool swap_axes;
  61. int reset_gpio;
  62. unsigned long irq_flags;
  63. unsigned int panel_x;
  64. unsigned int panel_y;
  65. unsigned int reset_delay_ms;
  66. unsigned char model_name[32];
  67. #ifdef SYNAPTICS_RMI_INFORM_CHARGER
  68. void (*register_cb)(struct synaptics_rmi_callbacks *);
  69. #endif
  70. #if defined(CONFIG_TOUCHSCREEN_SYNAPTICS_PREVENT_HSYNC_LEAKAGE)
  71. void (*hsync_onoff)(bool onoff);
  72. #endif
  73. };
  74. #if defined(CONFIG_TOUCHSCREEN_SYNAPTICS_PREVENT_HSYNC_LEAKAGE)
  75. extern void mdss_dsi_panel_hsync_onoff(bool onoff);
  76. #endif
  77. #endif