zinitix_touch.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // kernel/include/linux/input
  2. /*
  3. *
  4. * Zinitix bt532 touch driver
  5. *
  6. * Copyright (C) 2013 Samsung Electronics Co.Ltd
  7. *
  8. * This software is licensed under the terms of the GNU General Public
  9. * License version 2, as published by the Free Software Foundation, and
  10. * may be copied, distributed, and modified under those terms.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. */
  18. #ifndef _LINUX_BT532_TS_H
  19. #define _LINUX_BT532_TS_H
  20. #define TS_DRVIER_VERSION "1.0.18_1"
  21. #define BT532_TS_DEVICE "ZINITIX_NAME"
  22. #define ZINITIX_NAME "zinitix_touch"
  23. extern struct tsp_callbacks *charger_callbacks;
  24. struct tsp_callbacks {
  25. void (*inform_charger)(struct tsp_callbacks *tsp_cb, bool mode);
  26. };
  27. #define zinitix_debug_msg(fmt, args...) \
  28. do { \
  29. if (m_ts_debug_mode) \
  30. printk(KERN_ERR "bt532_ts[%-18s:%5d] " fmt, \
  31. __func__, __LINE__, ## args); \
  32. } while (0);
  33. #define zinitix_printk(fmt, args...) \
  34. do { \
  35. printk(KERN_ERR "bt532_ts[%-18s:%5d] " fmt, \
  36. __func__, __LINE__, ## args); \
  37. } while (0);
  38. struct bt532_ts_platform_data {
  39. u32 gpio_int;
  40. u32 gpio_ldo_en;
  41. u16 x_resolution;
  42. u16 y_resolution;
  43. u16 page_size;
  44. //void (*vdd_on)(bt532_ts_platform_data*, bool);
  45. int (*is_vdd_on)(void);
  46. u8 orientation;
  47. u32 gpio_vendor1;
  48. u32 gpio_vendor2;
  49. };
  50. extern struct class *sec_class;
  51. #endif /* LINUX_BT532_TS_H */