pt_platform.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * pt_platform.h
  3. * Parade TrueTouch(TM) Standard Product Platform Module.
  4. * For use with Parade touchscreen controllers.
  5. * Supported parts include:
  6. * TMA5XX
  7. * TMA448
  8. * TMA445A
  9. * TT21XXX
  10. * TT31XXX
  11. * TT4XXXX
  12. * TT7XXX
  13. * TC3XXX
  14. *
  15. * Copyright (C) 2015-2020 Parade Technologies
  16. *
  17. * This program is free software; you can redistribute it and/or
  18. * modify it under the terms of the GNU General Public License
  19. * version 2, and only version 2, as published by the
  20. * Free Software Foundation.
  21. *
  22. * This program is distributed in the hope that it will be useful,
  23. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  25. * GNU General Public License for more details.
  26. *
  27. * Contact Parade Technologies at www.parade.com <[email protected]>
  28. */
  29. #ifndef _LINUX_PT_PLATFORM_H
  30. #define _LINUX_PT_PLATFORM_H
  31. #include "pt_core.h"
  32. #include <linux/irq.h>
  33. #if defined(CONFIG_TOUCHSCREEN_PARADE) \
  34. || defined(CONFIG_TOUCHSCREEN_PARADE_MODULE)
  35. extern struct pt_loader_platform_data _pt_loader_platform_data;
  36. extern irqreturn_t pt_irq(int irq, void *handle);
  37. int pt_xres(struct pt_core_platform_data *pdata, struct device *dev);
  38. int pt_init(struct pt_core_platform_data *pdata, int on,
  39. struct device *dev);
  40. int pt_power(struct pt_core_platform_data *pdata, int on,
  41. struct device *dev, atomic_t *ignore_irq);
  42. #ifdef PT_DETECT_HW
  43. int pt_detect(struct pt_core_platform_data *pdata,
  44. struct device *dev, pt_platform_read read);
  45. #else
  46. #define pt_detect NULL
  47. #endif
  48. int pt_irq_stat(struct pt_core_platform_data *pdata,
  49. struct device *dev);
  50. int pt_setup_power(struct pt_core_platform_data *pdata, int on,
  51. struct device *dev);
  52. int pt_setup_irq(struct pt_core_platform_data *pdata, int on,
  53. struct device *dev);
  54. #else /* !CONFIG_TOUCHSCREEN_PARADE */
  55. static struct pt_loader_platform_data _pt_loader_platform_data;
  56. #define pt_xres NULL
  57. #define pt_init NULL
  58. #define pt_power NULL
  59. #define pt_irq_stat NULL
  60. #define pt_detect NULL
  61. #define pt_setup_power NULL
  62. #define pt_setup_irq NULL
  63. #endif /* CONFIG_TOUCHSCREEN_PARADE */
  64. #endif /* _LINUX_PT_PLATFORM_H */