samsung-keypad.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Samsung Keypad platform data definitions
  3. *
  4. * Copyright (C) 2010 Samsung Electronics Co.Ltd
  5. * Author: Joonyoung Shim <jy0922.shim@samsung.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation; either version 2 of the License, or (at your
  10. * option) any later version.
  11. */
  12. #ifndef __SAMSUNG_KEYPAD_H
  13. #define __SAMSUNG_KEYPAD_H
  14. #include <linux/input/matrix_keypad.h>
  15. #define SAMSUNG_MAX_ROWS 8
  16. #define SAMSUNG_MAX_COLS 8
  17. /**
  18. * struct samsung_keypad_platdata - Platform device data for Samsung Keypad.
  19. * @keymap_data: pointer to &matrix_keymap_data.
  20. * @rows: number of keypad row supported.
  21. * @cols: number of keypad col supported.
  22. * @no_autorepeat: disable key autorepeat.
  23. * @wakeup: controls whether the device should be set up as wakeup source.
  24. * @cfg_gpio: configure the GPIO.
  25. *
  26. * Initialisation data specific to either the machine or the platform
  27. * for the device driver to use or call-back when configuring gpio.
  28. */
  29. struct samsung_keypad_platdata {
  30. const struct matrix_keymap_data *keymap_data;
  31. unsigned int rows;
  32. unsigned int cols;
  33. bool no_autorepeat;
  34. bool wakeup;
  35. void (*cfg_gpio)(unsigned int rows, unsigned int cols);
  36. };
  37. #endif /* __SAMSUNG_KEYPAD_H */