ad7879.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* linux/spi/ad7879.h */
  2. /* Touchscreen characteristics vary between boards and models. The
  3. * platform_data for the device's "struct device" holds this information.
  4. *
  5. * It's OK if the min/max values are zero.
  6. */
  7. struct ad7879_platform_data {
  8. u16 model; /* 7879 */
  9. u16 x_plate_ohms;
  10. u16 x_min, x_max;
  11. u16 y_min, y_max;
  12. u16 pressure_min, pressure_max;
  13. bool swap_xy; /* swap x and y axes */
  14. /* [0..255] 0=OFF Starts at 1=550us and goes
  15. * all the way to 9.440ms in steps of 35us.
  16. */
  17. u8 pen_down_acc_interval;
  18. /* [0..15] Starts at 0=128us and goes all the
  19. * way to 4.096ms in steps of 128us.
  20. */
  21. u8 first_conversion_delay;
  22. /* [0..3] 0 = 2us, 1 = 4us, 2 = 8us, 3 = 16us */
  23. u8 acquisition_time;
  24. /* [0..3] Average X middle samples 0 = 2, 1 = 4, 2 = 8, 3 = 16 */
  25. u8 averaging;
  26. /* [0..3] Perform X measurements 0 = OFF,
  27. * 1 = 4, 2 = 8, 3 = 16 (median > averaging)
  28. */
  29. u8 median;
  30. /* 1 = AUX/VBAT/GPIO export GPIO to gpiolib
  31. * requires CONFIG_GPIOLIB
  32. */
  33. bool gpio_export;
  34. /* identifies the first GPIO number handled by this chip;
  35. * or, if negative, requests dynamic ID allocation.
  36. */
  37. s32 gpio_base;
  38. };