2 * Copyright (c) 2011, 2012 Synaptics Incorporated
3 * Copyright (c) 2011 Unixphere
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef _SYNAPTICS_RMI4_GENERIC_H_
21 #define _SYNAPTICS_RMI4_GENERIC_H_
23 #ifndef CONFIG_KEYBOARD_CYPRESS_TOUCH
24 #define NO_0D_WHILE_2D
27 struct synaptics_rmi_f1a_button_map
{
28 unsigned char nbuttons
;
32 #ifdef SYNAPTICS_RMI_INFORM_CHARGER
33 struct synaptics_rmi_callbacks
{
34 void (*inform_charger
)(struct synaptics_rmi_callbacks
*, int);
39 * struct synaptics_rmi4_platform_data - rmi4 platform data
40 * @x_flip: x flip flag
41 * @y_flip: y flip flag
42 * @regulator_en: regulator enable flag
43 * @gpio: attention interrupt gpio
45 * @gpio_config: pointer to gpio configuration function
46 * @f1a_button_map: pointer to 0d button map
47 * @charger_noti_type: define method to notify the connection of charger.
49 struct synaptics_rmi4_platform_data
{
52 unsigned int sensor_max_x
;
53 unsigned int sensor_max_y
;
54 unsigned int num_of_rx
;
55 unsigned int num_of_tx
;
56 unsigned char max_touch_width
;
57 unsigned char panel_revision
; /* to identify panel info */
61 int (*gpio_config
)(unsigned interrupt_gpio
, bool configure
);
62 int (*power
)(void *data
, bool on
);
64 int (*led_power_on
) (bool);
66 unsigned char (*get_ddi_type
)(void); /* to indentify ddi type */
67 void (*enable_sync
)(bool on
);
68 const char *firmware_name
;
69 const char *project_name
;
70 const char *model_name
;
71 #ifdef SYNAPTICS_RMI_INFORM_CHARGER
72 void (*register_cb
)(struct synaptics_rmi_callbacks
*);
74 bool charger_noti_type
;
75 struct synaptics_rmi_f1a_button_map
*f1a_button_map
;
77 const char *regulator_dvdd
;
78 const char *regulator_avdd
;
79 struct regulator
*regul_dvdd
;
82 extern unsigned int lcdtype
;