samsung-keypad.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Samsung Keypad platform data definitions
  4. *
  5. * Copyright (C) 2010 Samsung Electronics Co.Ltd
  6. * Author: Joonyoung Shim <[email protected]>
  7. */
  8. #ifndef __SAMSUNG_KEYPAD_H
  9. #define __SAMSUNG_KEYPAD_H
  10. #include <linux/input/matrix_keypad.h>
  11. #define SAMSUNG_MAX_ROWS 8
  12. #define SAMSUNG_MAX_COLS 8
  13. /**
  14. * struct samsung_keypad_platdata - Platform device data for Samsung Keypad.
  15. * @keymap_data: pointer to &matrix_keymap_data.
  16. * @rows: number of keypad row supported.
  17. * @cols: number of keypad col supported.
  18. * @no_autorepeat: disable key autorepeat.
  19. * @wakeup: controls whether the device should be set up as wakeup source.
  20. * @cfg_gpio: configure the GPIO.
  21. *
  22. * Initialisation data specific to either the machine or the platform
  23. * for the device driver to use or call-back when configuring gpio.
  24. */
  25. struct samsung_keypad_platdata {
  26. const struct matrix_keymap_data *keymap_data;
  27. unsigned int rows;
  28. unsigned int cols;
  29. bool no_autorepeat;
  30. bool wakeup;
  31. void (*cfg_gpio)(unsigned int rows, unsigned int cols);
  32. };
  33. #endif /* __SAMSUNG_KEYPAD_H */