blob: a2fd6acdd7ec13fc9b01bafa7de896686ebd1638 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#ifndef __PMIC8058_KEYPAD_H__
15#define __PMIC8058_KEYPAD_H__
16
17#include <linux/input/matrix_keypad.h>
18
19/*
20 * NOTE: Assumption of maximum of five revisions
21 * of PMIC8058 chip.
22 */
23#define MAX_PM8058_REVS 0x5
24
25struct pmic8058_keypad_data {
26 const struct matrix_keymap_data *keymap_data;
27
28 const char *input_name;
29 const char *input_phys_device;
30
31 unsigned int num_cols;
32 unsigned int num_rows;
33
34 unsigned int rows_gpio_start;
35 unsigned int cols_gpio_start;
36
37 unsigned int debounce_ms[MAX_PM8058_REVS];
38 unsigned int scan_delay_ms;
39 unsigned int row_hold_ns;
40
41 int keymap_size;
42 const unsigned int *keymap;
43
44 unsigned int wakeup;
45 unsigned int rep;
46};
47
48#endif /*__PMIC8058_KEYPAD_H__ */