Alexandra Chin | 669d27c | 2012-12-24 15:42:30 +0800 | [diff] [blame] | 1 | /* |
| 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> |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License as published by |
| 11 | * the Free Software Foundation; either version 2 of the License, or |
| 12 | * (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | */ |
| 19 | |
| 20 | #ifndef _SYNAPTICS_DSX_H_ |
| 21 | #define _SYNAPTICS_DSX_H_ |
| 22 | |
| 23 | /* |
| 24 | * struct synaptics_rmi4_capacitance_button_map - 0d button map |
| 25 | * @nbuttons: number of buttons |
| 26 | * @map: button map |
| 27 | */ |
| 28 | struct synaptics_rmi4_capacitance_button_map { |
| 29 | unsigned char nbuttons; |
| 30 | unsigned char *map; |
| 31 | }; |
| 32 | |
| 33 | /* |
| 34 | * struct synaptics_rmi4_platform_data - rmi4 platform data |
| 35 | * @x_flip: x flip flag |
| 36 | * @y_flip: y flip flag |
| 37 | * @regulator_en: regulator enable flag |
| 38 | * @irq_gpio: attention interrupt gpio |
| 39 | * @irq_flags: flags used by the irq |
| 40 | * @reset_gpio: reset gpio |
| 41 | * @panel_x: panel maximum values on the x |
| 42 | * @panel_y: panel maximum values on the y |
| 43 | * @gpio_config: pointer to gpio configuration function |
| 44 | * @capacitance_button_map: pointer to 0d button map |
| 45 | */ |
| 46 | struct synaptics_rmi4_platform_data { |
| 47 | bool x_flip; |
| 48 | bool y_flip; |
| 49 | bool regulator_en; |
| 50 | unsigned irq_gpio; |
| 51 | unsigned long irq_flags; |
| 52 | unsigned reset_gpio; |
| 53 | unsigned panel_x; |
| 54 | unsigned panel_y; |
| 55 | int (*gpio_config)(unsigned gpio, bool configure); |
| 56 | struct synaptics_rmi4_capacitance_button_map *capacitance_button_map; |
| 57 | }; |
| 58 | |
| 59 | #endif |