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> |
Amy Maloche | 1a53b61 | 2013-01-18 15:25:15 -0800 | [diff] [blame] | 8 | * Copyright (c) 2013, The Linux Foundation. All rights reserved. |
Alexandra Chin | 669d27c | 2012-12-24 15:42:30 +0800 | [diff] [blame] | 9 | * |
| 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 | */ |
| 29 | struct 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 | */ |
| 47 | struct synaptics_rmi4_platform_data { |
| 48 | bool x_flip; |
| 49 | bool y_flip; |
| 50 | bool regulator_en; |
Amy Maloche | 1a53b61 | 2013-01-18 15:25:15 -0800 | [diff] [blame] | 51 | bool i2c_pull_up; |
Alexandra Chin | 669d27c | 2012-12-24 15:42:30 +0800 | [diff] [blame] | 52 | unsigned irq_gpio; |
Amy Maloche | ecfb489 | 2013-02-06 13:30:36 -0800 | [diff] [blame] | 53 | u32 irq_flags; |
| 54 | u32 reset_flags; |
Alexandra Chin | 669d27c | 2012-12-24 15:42:30 +0800 | [diff] [blame] | 55 | 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 |