blob: 56616d70b26d3667db70edb3f4ef6c2eda91562f [file] [log] [blame]
Alexandra Chin669d27c2012-12-24 15:42:30 +08001/*
2 * Synaptics RMI4 touchscreen driver
3 *
4 * Copyright (C) 2012 Synaptics Incorporated
5 *
6 * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com>
7 * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com>
Amy Maloche1a53b612013-01-18 15:25:15 -08008 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
Alexandra Chin669d27c2012-12-24 15:42:30 +08009 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 */
20
21#ifndef _SYNAPTICS_DSX_H_
22#define _SYNAPTICS_DSX_H_
23
24/*
25 * struct synaptics_rmi4_capacitance_button_map - 0d button map
26 * @nbuttons: number of buttons
27 * @map: button map
28 */
29struct synaptics_rmi4_capacitance_button_map {
30 unsigned char nbuttons;
31 unsigned char *map;
32};
33
34/*
35 * struct synaptics_rmi4_platform_data - rmi4 platform data
36 * @x_flip: x flip flag
37 * @y_flip: y flip flag
38 * @regulator_en: regulator enable flag
39 * @irq_gpio: attention interrupt gpio
40 * @irq_flags: flags used by the irq
41 * @reset_gpio: reset gpio
42 * @panel_x: panel maximum values on the x
43 * @panel_y: panel maximum values on the y
44 * @gpio_config: pointer to gpio configuration function
45 * @capacitance_button_map: pointer to 0d button map
46 */
47struct synaptics_rmi4_platform_data {
48 bool x_flip;
49 bool y_flip;
50 bool regulator_en;
Amy Maloche1a53b612013-01-18 15:25:15 -080051 bool i2c_pull_up;
Alexandra Chin669d27c2012-12-24 15:42:30 +080052 unsigned irq_gpio;
Amy Malocheecfb4892013-02-06 13:30:36 -080053 u32 irq_flags;
54 u32 reset_flags;
Alexandra Chin669d27c2012-12-24 15:42:30 +080055 unsigned reset_gpio;
56 unsigned panel_x;
57 unsigned panel_y;
58 int (*gpio_config)(unsigned gpio, bool configure);
59 struct synaptics_rmi4_capacitance_button_map *capacitance_button_map;
60};
61
62#endif