2 * Samsung Platform - Keypad platform data definitions
4 * Copyright (C) 2010 Samsung Electronics Co.Ltd
5 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
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.
13 #ifndef __PLAT_SAMSUNG_KEYPAD_H
14 #define __PLAT_SAMSUNG_KEYPAD_H
16 #include <linux/input/matrix_keypad.h>
18 #define SAMSUNG_MAX_ROWS 8
19 #define SAMSUNG_MAX_COLS 8
22 * struct samsung_keypad_platdata - Platform device data for Samsung Keypad.
23 * @keymap_data: pointer to &matrix_keymap_data.
24 * @rows: number of keypad row supported.
25 * @cols: number of keypad col supported.
26 * @no_autorepeat: disable key autorepeat.
27 * @wakeup: controls whether the device should be set up as wakeup source.
28 * @cfg_gpio: configure the GPIO.
30 * Initialisation data specific to either the machine or the platform
31 * for the device driver to use or call-back when configuring gpio.
33 struct samsung_keypad_platdata
{
34 const struct matrix_keymap_data
*keymap_data
;
40 void (*cfg_gpio
)(unsigned int rows
, unsigned int cols
);
44 * samsung_keypad_set_platdata - Set platform data for Samsung Keypad device.
45 * @pd: Platform data to register to device.
47 * Register the given platform data for use with Samsung Keypad device.
48 * The call will copy the platform data, so the board definitions can
49 * make the structure itself __initdata.
51 extern void samsung_keypad_set_platdata(struct samsung_keypad_platdata
*pd
);
53 /* defined by architecture to configure gpio. */
54 extern void samsung_keypad_cfg_gpio(unsigned int rows
, unsigned int cols
);
56 #endif /* __PLAT_SAMSUNG_KEYPAD_H */