Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Samsung Keypad platform data definitions
0004  *
0005  * Copyright (C) 2010 Samsung Electronics Co.Ltd
0006  * Author: Joonyoung Shim <jy0922.shim@samsung.com>
0007  */
0008 
0009 #ifndef __SAMSUNG_KEYPAD_H
0010 #define __SAMSUNG_KEYPAD_H
0011 
0012 #include <linux/input/matrix_keypad.h>
0013 
0014 #define SAMSUNG_MAX_ROWS    8
0015 #define SAMSUNG_MAX_COLS    8
0016 
0017 /**
0018  * struct samsung_keypad_platdata - Platform device data for Samsung Keypad.
0019  * @keymap_data: pointer to &matrix_keymap_data.
0020  * @rows: number of keypad row supported.
0021  * @cols: number of keypad col supported.
0022  * @no_autorepeat: disable key autorepeat.
0023  * @wakeup: controls whether the device should be set up as wakeup source.
0024  * @cfg_gpio: configure the GPIO.
0025  *
0026  * Initialisation data specific to either the machine or the platform
0027  * for the device driver to use or call-back when configuring gpio.
0028  */
0029 struct samsung_keypad_platdata {
0030     const struct matrix_keymap_data *keymap_data;
0031     unsigned int rows;
0032     unsigned int cols;
0033     bool no_autorepeat;
0034     bool wakeup;
0035 
0036     void (*cfg_gpio)(unsigned int rows, unsigned int cols);
0037 };
0038 
0039 #endif /* __SAMSUNG_KEYPAD_H */