diff options
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/cyttsp4.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/include/linux/platform_data/cyttsp4.h b/include/linux/platform_data/cyttsp4.h new file mode 100644 index 000000000000..6eba54aff1dc --- /dev/null +++ b/include/linux/platform_data/cyttsp4.h | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | /* | ||
| 2 | * Header file for: | ||
| 3 | * Cypress TrueTouch(TM) Standard Product (TTSP) touchscreen drivers. | ||
| 4 | * For use with Cypress Txx3xx parts. | ||
| 5 | * Supported parts include: | ||
| 6 | * CY8CTST341 | ||
| 7 | * CY8CTMA340 | ||
| 8 | * | ||
| 9 | * Copyright (C) 2009, 2010, 2011 Cypress Semiconductor, Inc. | ||
| 10 | * Copyright (C) 2012 Javier Martinez Canillas <javier@dowhile0.org> | ||
| 11 | * | ||
| 12 | * This program is free software; you can redistribute it and/or | ||
| 13 | * modify it under the terms of the GNU General Public License | ||
| 14 | * version 2, and only version 2, as published by the | ||
| 15 | * Free Software Foundation. | ||
| 16 | * | ||
| 17 | * This program is distributed in the hope that it will be useful, | ||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | * GNU General Public License for more details. | ||
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License along | ||
| 23 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 24 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 25 | * | ||
| 26 | * Contact Cypress Semiconductor at www.cypress.com (kev@cypress.com) | ||
| 27 | * | ||
| 28 | */ | ||
| 29 | #ifndef _CYTTSP4_H_ | ||
| 30 | #define _CYTTSP4_H_ | ||
| 31 | |||
| 32 | #define CYTTSP4_MT_NAME "cyttsp4_mt" | ||
| 33 | #define CYTTSP4_I2C_NAME "cyttsp4_i2c_adapter" | ||
| 34 | #define CYTTSP4_SPI_NAME "cyttsp4_spi_adapter" | ||
| 35 | |||
| 36 | #define CY_TOUCH_SETTINGS_MAX 32 | ||
| 37 | |||
| 38 | struct touch_framework { | ||
| 39 | const uint16_t *abs; | ||
| 40 | uint8_t size; | ||
| 41 | uint8_t enable_vkeys; | ||
| 42 | } __packed; | ||
| 43 | |||
| 44 | struct cyttsp4_mt_platform_data { | ||
| 45 | struct touch_framework *frmwrk; | ||
| 46 | unsigned short flags; | ||
| 47 | char const *inp_dev_name; | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct touch_settings { | ||
| 51 | const uint8_t *data; | ||
| 52 | uint32_t size; | ||
| 53 | uint8_t tag; | ||
| 54 | } __packed; | ||
| 55 | |||
| 56 | struct cyttsp4_core_platform_data { | ||
| 57 | int irq_gpio; | ||
| 58 | int rst_gpio; | ||
| 59 | int level_irq_udelay; | ||
| 60 | int (*xres)(struct cyttsp4_core_platform_data *pdata, | ||
| 61 | struct device *dev); | ||
| 62 | int (*init)(struct cyttsp4_core_platform_data *pdata, | ||
| 63 | int on, struct device *dev); | ||
| 64 | int (*power)(struct cyttsp4_core_platform_data *pdata, | ||
| 65 | int on, struct device *dev, atomic_t *ignore_irq); | ||
| 66 | int (*irq_stat)(struct cyttsp4_core_platform_data *pdata, | ||
| 67 | struct device *dev); | ||
| 68 | struct touch_settings *sett[CY_TOUCH_SETTINGS_MAX]; | ||
| 69 | }; | ||
| 70 | |||
| 71 | struct cyttsp4_platform_data { | ||
| 72 | struct cyttsp4_core_platform_data *core_pdata; | ||
| 73 | struct cyttsp4_mt_platform_data *mt_pdata; | ||
| 74 | }; | ||
| 75 | |||
| 76 | #endif /* _CYTTSP4_H_ */ | ||
