cyttsp4.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Header file for:
  4. * Cypress TrueTouch(TM) Standard Product (TTSP) touchscreen drivers.
  5. * For use with Cypress Txx3xx parts.
  6. * Supported parts include:
  7. * CY8CTST341
  8. * CY8CTMA340
  9. *
  10. * Copyright (C) 2009, 2010, 2011 Cypress Semiconductor, Inc.
  11. * Copyright (C) 2012 Javier Martinez Canillas <[email protected]>
  12. *
  13. * Contact Cypress Semiconductor at www.cypress.com ([email protected])
  14. */
  15. #ifndef _CYTTSP4_H_
  16. #define _CYTTSP4_H_
  17. #define CYTTSP4_MT_NAME "cyttsp4_mt"
  18. #define CYTTSP4_I2C_NAME "cyttsp4_i2c_adapter"
  19. #define CYTTSP4_SPI_NAME "cyttsp4_spi_adapter"
  20. #define CY_TOUCH_SETTINGS_MAX 32
  21. struct touch_framework {
  22. const uint16_t *abs;
  23. uint8_t size;
  24. uint8_t enable_vkeys;
  25. } __packed;
  26. struct cyttsp4_mt_platform_data {
  27. struct touch_framework *frmwrk;
  28. unsigned short flags;
  29. char const *inp_dev_name;
  30. };
  31. struct touch_settings {
  32. const uint8_t *data;
  33. uint32_t size;
  34. uint8_t tag;
  35. } __packed;
  36. struct cyttsp4_core_platform_data {
  37. int irq_gpio;
  38. int rst_gpio;
  39. int level_irq_udelay;
  40. int (*xres)(struct cyttsp4_core_platform_data *pdata,
  41. struct device *dev);
  42. int (*init)(struct cyttsp4_core_platform_data *pdata,
  43. int on, struct device *dev);
  44. int (*power)(struct cyttsp4_core_platform_data *pdata,
  45. int on, struct device *dev, atomic_t *ignore_irq);
  46. int (*irq_stat)(struct cyttsp4_core_platform_data *pdata,
  47. struct device *dev);
  48. struct touch_settings *sett[CY_TOUCH_SETTINGS_MAX];
  49. };
  50. struct cyttsp4_platform_data {
  51. struct cyttsp4_core_platform_data *core_pdata;
  52. struct cyttsp4_mt_platform_data *mt_pdata;
  53. };
  54. #endif /* _CYTTSP4_H_ */