mms_ts.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * mms_ts.h - Platform data for Melfas MMS-series touch driver
  3. *
  4. * Copyright (C) 2011 Google Inc.
  5. * Author: Dima Zavin <dima@android.com>
  6. *
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the
  10. * Free Software Foundation; either version 2 of the License, or (at your
  11. * option) any later version.
  12. *
  13. */
  14. #ifndef _LINUX_MMS_TOUCH_H
  15. #define _LINUX_MMS_TOUCH_H
  16. #if defined(CONFIG_TOUCHSCREEN_MMS136)
  17. #define MELFAS_TS_NAME "mms136_ts"
  18. #else
  19. #define MELFAS_TS_NAME "mms144_ts"
  20. #endif
  21. #if defined(CONFIG_TOUCHSCREEN_MMS136)
  22. struct mms_ts_platform_data {
  23. int max_x;
  24. int max_y;
  25. bool invert_x;
  26. bool invert_y;
  27. bool i2c_pull_up;
  28. int gpio_int;
  29. u32 irq_gpio_flags;
  30. u32 sda_gpio_flags;
  31. u32 scl_gpio_flags;
  32. int vdd_en;
  33. int gpio_sda;
  34. int gpio_scl;
  35. int gpio_resetb;
  36. int gpio_vdd_en;
  37. int (*mux_fw_flash)(bool to_gpios);
  38. const char *fw_name;
  39. };
  40. #else
  41. struct mms_ts_platform_data {
  42. int max_x;
  43. int max_y;
  44. bool invert_x;
  45. bool invert_y;
  46. bool flip_xy;
  47. // int gpio_sda;
  48. // int gpio_scl;
  49. bool i2c_pull_up;
  50. int gpio_int;
  51. u32 irq_gpio_flags;
  52. int gpio_sda;
  53. u32 sda_gpio_flags;
  54. int gpio_scl;
  55. u32 scl_gpio_flags;
  56. int gpio_resetb;
  57. int vdd_en;
  58. // int gpio_resetb;
  59. int gpio_lcd_type;
  60. int (*mux_fw_flash)(bool to_gpios);
  61. void (*vdd_on)(bool);
  62. int (*is_vdd_on)(void);
  63. // void (*register_cb)(struct tsp_callbacks *);
  64. const char *fw_name;
  65. bool use_touchkey;
  66. const u8 *touchkey_keycode;
  67. const u8 *config_fw_version;
  68. int check_module_type;
  69. };
  70. extern struct class *sec_class;
  71. extern int poweroff_charging;
  72. extern unsigned char LCD_Get_Value(void);
  73. //extern struct tsp_callbacks {
  74. // void (*inform_charger)(struct tsp_callbacks *tsp_cb, bool mode);
  75. //};
  76. extern struct tsp_callbacks *charger_callbacks;
  77. #endif
  78. #endif /* _LINUX_MMS_TOUCH_H */