cyttsp4_platform.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * cyttsp4_platform.h
  3. * Cypress TrueTouch(TM) Standard Product V4 Platform Module.
  4. * For use with Cypress Txx4xx parts.
  5. * Supported parts include:
  6. * TMA4XX
  7. * TMA1036
  8. *
  9. * Copyright (C) 2013 Cypress Semiconductor
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License
  13. * version 2, and only version 2, as published by the
  14. * Free Software Foundation.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * Contact Cypress Semiconductor at www.cypress.com <ttdrivers@cypress.com>
  22. *
  23. */
  24. #ifndef _LINUX_CYTTSP4_PLATFORM_H
  25. #define _LINUX_CYTTSP4_PLATFORM_H
  26. #include <linux/cyttsp4_core.h>
  27. #if defined(CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4) \
  28. || defined(CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4_MODULE)
  29. extern struct cyttsp4_loader_platform_data _cyttsp4_loader_platform_data;
  30. int cyttsp4_xres(struct cyttsp4_core_platform_data *pdata,
  31. struct device *dev);
  32. int cyttsp4_init(struct cyttsp4_core_platform_data *pdata,
  33. int on, struct device *dev);
  34. int cyttsp4_power(struct cyttsp4_core_platform_data *pdata,
  35. int on, struct device *dev, atomic_t *ignore_irq);
  36. int cyttsp4_irq_stat(struct cyttsp4_core_platform_data *pdata,
  37. struct device *dev);
  38. #ifdef CYTTSP4_DETECT_HW
  39. int cyttsp4_detect(struct cyttsp4_core_platform_data *pdata,
  40. struct device *dev, cyttsp4_platform_read read);
  41. #else//CYTTSP4_DETECT_HW
  42. #define cyttsp4_detect NULL
  43. #endif//CYTTSP4_DETECT_HW
  44. #else /* !CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4 */
  45. static struct cyttsp4_loader_platform_data _cyttsp4_loader_platform_data;
  46. #define cyttsp4_xres NULL
  47. #define cyttsp4_init NULL
  48. #define cyttsp4_power NULL
  49. #define cyttsp4_irq_stat NULL
  50. #define cyttsp4_detect NULL
  51. #endif /* CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4 */
  52. #if !defined(CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP4_DEVICETREE_SUPPORT) &&\
  53. defined(CYTTSP4_PDATA_IN_PLATFORM_C)
  54. extern struct cyttsp4_platform_data _cyttsp4_platform_data;
  55. #endif
  56. #endif /* _LINUX_CYTTSP4_PLATFORM_H */