synaptics_dsx.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Synaptics DSX touchscreen driver
  3. *
  4. * Copyright (C) 2012 Synaptics Incorporated
  5. *
  6. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com>
  7. * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. */
  19. #ifndef _SYNAPTICS_DSX_H_
  20. #define _SYNAPTICS_DSX_H_
  21. /*
  22. * synaptics_dsx_cap_button_map - 0d button map
  23. * @nbuttons: number of 0d buttons
  24. * @map: pointer to array of button types
  25. */
  26. struct synaptics_dsx_cap_button_map {
  27. unsigned char nbuttons;
  28. unsigned char *map;
  29. };
  30. /*
  31. * struct synaptics_dsx_platform_data - dsx platform data
  32. * @x_flip: x flip flag
  33. * @y_flip: y flip flag
  34. * @regulator_en: regulator enable flag
  35. * @irq_flags: irq flags
  36. * @panel_x: x-axis resolution of display panel
  37. * @panel_y: y-axis resolution of display panel
  38. * @gpio_config: pointer to gpio configuration function
  39. * @cap_button_map: pointer to 0d button map
  40. */
  41. struct synaptics_dsx_platform_data {
  42. bool x_flip;
  43. bool y_flip;
  44. bool swap_axes;
  45. bool regulator_en;
  46. unsigned long irq_flags;
  47. unsigned int panel_x;
  48. unsigned int panel_y;
  49. unsigned int reset_delay_ms;
  50. int (*gpio_config)(int gpio, bool configure);
  51. struct synaptics_dsx_cap_button_map *cap_button_map;
  52. };
  53. #endif