ad714x.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * include/linux/input/ad714x.h
  3. *
  4. * AD714x is very flexible, it can be used as buttons, scrollwheel,
  5. * slider, touchpad at the same time. That depends on the boards.
  6. * The platform_data for the device's "struct device" holds this
  7. * information.
  8. *
  9. * Copyright 2009-2011 Analog Devices Inc.
  10. *
  11. * Licensed under the GPL-2 or later.
  12. */
  13. #ifndef __LINUX_INPUT_AD714X_H__
  14. #define __LINUX_INPUT_AD714X_H__
  15. #define STAGE_NUM 12
  16. #define STAGE_CFGREG_NUM 8
  17. #define SYS_CFGREG_NUM 8
  18. /* board information which need be initialized in arch/mach... */
  19. struct ad714x_slider_plat {
  20. int start_stage;
  21. int end_stage;
  22. int max_coord;
  23. };
  24. struct ad714x_wheel_plat {
  25. int start_stage;
  26. int end_stage;
  27. int max_coord;
  28. };
  29. struct ad714x_touchpad_plat {
  30. int x_start_stage;
  31. int x_end_stage;
  32. int x_max_coord;
  33. int y_start_stage;
  34. int y_end_stage;
  35. int y_max_coord;
  36. };
  37. struct ad714x_button_plat {
  38. int keycode;
  39. unsigned short l_mask;
  40. unsigned short h_mask;
  41. };
  42. struct ad714x_platform_data {
  43. int slider_num;
  44. int wheel_num;
  45. int touchpad_num;
  46. int button_num;
  47. struct ad714x_slider_plat *slider;
  48. struct ad714x_wheel_plat *wheel;
  49. struct ad714x_touchpad_plat *touchpad;
  50. struct ad714x_button_plat *button;
  51. unsigned short stage_cfg_reg[STAGE_NUM][STAGE_CFGREG_NUM];
  52. unsigned short sys_cfg_reg[SYS_CFGREG_NUM];
  53. unsigned long irqflags;
  54. };
  55. #endif