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 <jy0922.shim@samsung.com> 7 */ 8 9 #ifndef __SAMSUNG_KEYPAD_H 10 #define __SAMSUNG_KEYPAD_H 11 12 #include <linux/input/matrix_keypad.h> 13 14 #define SAMSUNG_MAX_ROWS 8 15 #define SAMSUNG_MAX_COLS 8 16 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 36 void (*cfg_gpio)(unsigned int rows, unsigned int cols); 37 }; 38 39 #endif /* __SAMSUNG_KEYPAD_H */