mms144.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #define MELFAS_TS_NAME "mms144_ts"
  17. struct mms_ts_platform_data {
  18. int max_x;
  19. int max_y;
  20. bool invert_x;
  21. bool invert_y;
  22. bool flip_xy;
  23. // int gpio_sda;
  24. // int gpio_scl;
  25. bool i2c_pull_up;
  26. int gpio_int;
  27. u32 irq_gpio_flags;
  28. int gpio_sda;
  29. u32 sda_gpio_flags;
  30. int gpio_scl;
  31. u32 scl_gpio_flags;
  32. int gpio_resetb;
  33. int vdd_en;
  34. // int gpio_resetb;
  35. int gpio_lcd_type;
  36. int (*mux_fw_flash)(bool to_gpios);
  37. void (*vdd_on)(bool);
  38. int (*is_vdd_on)(void);
  39. // void (*register_cb)(struct tsp_callbacks *);
  40. const char *fw_name;
  41. bool use_touchkey;
  42. const u8 *touchkey_keycode;
  43. const u8 *config_fw_version;
  44. int check_module_type;
  45. };
  46. extern struct class *sec_class;
  47. extern int poweroff_charging;
  48. extern unsigned char LCD_Get_Value(void);
  49. //extern struct tsp_callbacks {
  50. // void (*inform_charger)(struct tsp_callbacks *tsp_cb, bool mode);
  51. //};
  52. extern struct tsp_callbacks *charger_callbacks;
  53. #endif /* _LINUX_MMS_TOUCH_H */