keypad-nomadik-ske.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2010
  3. *
  4. * License Terms: GNU General Public License v2
  5. * Author: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>
  6. *
  7. * ux500 Scroll key and Keypad Encoder (SKE) header
  8. */
  9. #ifndef __SKE_H
  10. #define __SKE_H
  11. #include <linux/input/matrix_keypad.h>
  12. /* register definitions for SKE peripheral */
  13. #define SKE_CR 0x00
  14. #define SKE_VAL0 0x04
  15. #define SKE_VAL1 0x08
  16. #define SKE_DBCR 0x0C
  17. #define SKE_IMSC 0x10
  18. #define SKE_RIS 0x14
  19. #define SKE_MIS 0x18
  20. #define SKE_ICR 0x1C
  21. /*
  22. * Keypad module
  23. */
  24. /**
  25. * struct keypad_platform_data - structure for platform specific data
  26. * @init: pointer to keypad init function
  27. * @exit: pointer to keypad deinitialisation function
  28. * @keymap_data: matrix scan code table for keycodes
  29. * @krow: maximum number of rows
  30. * @kcol: maximum number of columns
  31. * @debounce_ms: platform specific debounce time
  32. * @no_autorepeat: flag for auto repetition
  33. * @wakeup_enable: allow waking up the system
  34. */
  35. struct ske_keypad_platform_data {
  36. int (*init)(void);
  37. int (*exit)(void);
  38. const struct matrix_keymap_data *keymap_data;
  39. u8 krow;
  40. u8 kcol;
  41. u8 debounce_ms;
  42. bool no_autorepeat;
  43. bool wakeup_enable;
  44. };
  45. #endif /*__SKE_KPD_H*/