pmic8xxx-keypad.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Copyright (c) 2011, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef __PMIC8XXX_KEYPAD_H__
  13. #define __PMIC8XXX_KEYPAD_H__
  14. #include <linux/input/matrix_keypad.h>
  15. #define PM8XXX_KEYPAD_DEV_NAME "pm8xxx-keypad"
  16. /**
  17. * struct pm8xxx_keypad_platform_data - platform data for keypad
  18. * @keymap_data - matrix keymap data
  19. * @input_name - input device name
  20. * @input_phys_device - input device name
  21. * @num_cols - number of columns of keypad
  22. * @num_rows - number of row of keypad
  23. * @debounce_ms - debounce period in milliseconds
  24. * @scan_delay_ms - scan delay in milliseconds
  25. * @row_hold_ns - row hold period in nanoseconds
  26. * @wakeup - configure keypad as wakeup
  27. * @rep - enable or disable key repeat bit
  28. */
  29. struct pm8xxx_keypad_platform_data {
  30. const struct matrix_keymap_data *keymap_data;
  31. const char *input_name;
  32. const char *input_phys_device;
  33. unsigned int num_cols;
  34. unsigned int num_rows;
  35. unsigned int rows_gpio_start;
  36. unsigned int cols_gpio_start;
  37. unsigned int debounce_ms;
  38. unsigned int scan_delay_ms;
  39. unsigned int row_hold_ns;
  40. bool wakeup;
  41. bool rep;
  42. };
  43. #endif /*__PMIC8XXX_KEYPAD_H__ */