zinitix_bt532_ts.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. *
  3. * Zinitix bt532 touch driver
  4. *
  5. * Copyright (C) 2013 Samsung Electronics Co.Ltd
  6. *
  7. * This software is licensed under the terms of the GNU General Public
  8. * License version 2, as published by the Free Software Foundation, and
  9. * may be copied, distributed, and modified under those terms.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. */
  17. #ifndef _LINUX_BT532_TS_H
  18. #define _LINUX_BT532_TS_H
  19. #define TS_DRVIER_VERSION "1.0.18_1"
  20. #define BT532_TS_DEVICE "bt532_ts_device"
  21. #if defined(CONFIG_SEC_MEGA23G_COMMON) || defined(CONFIG_SEC_MEGA2LTE_COMMON)
  22. #define SUPPORTED_TOUCH_KEY_LED 1
  23. #else
  24. #define SUPPORTED_TOUCH_KEY_LED 0
  25. #endif
  26. #define zinitix_debug_msg(fmt, args...) \
  27. do { \
  28. if (m_ts_debug_mode) \
  29. printk(KERN_INFO "bt532_ts[%-18s:%5d] " fmt, \
  30. __func__, __LINE__, ## args); \
  31. } while (0);
  32. #define zinitix_printk(fmt, args...) \
  33. do { \
  34. printk(KERN_INFO "bt532_ts[%-18s:%5d] " fmt, \
  35. __func__, __LINE__, ## args); \
  36. } while (0);
  37. #define bt532_err(fmt) \
  38. do { \
  39. pr_err("bt532_ts : %s " fmt, __func__); \
  40. } while (0);
  41. struct bt532_ts_platform_data {
  42. int gpio_int;
  43. //u32 gpio_scl;
  44. //u32 gpio_sda;
  45. //u32 gpio_ldo_en;
  46. u32 tsp_irq;
  47. #if SUPPORTED_TOUCH_KEY_LED
  48. int gpio_keyled;
  49. #endif
  50. int tsp_vendor1;
  51. int tsp_vendor2;
  52. int tsp_en_gpio;
  53. u32 tsp_supply_type;
  54. //int (*tsp_power)(int on);
  55. u16 x_resolution;
  56. u16 y_resolution;
  57. u16 page_size;
  58. u8 orientation;
  59. const char *pname;
  60. };
  61. extern struct class *sec_class;
  62. #endif /* LINUX_BT532_TS_H */