Joonyoung Shim | 4cf51c3 | 2010-07-14 21:55:30 -0700 | [diff] [blame] | 1 | /* |
Iiro Valkonen | 7686b10 | 2011-02-02 23:21:58 -0800 | [diff] [blame] | 2 | * Atmel maXTouch Touchscreen driver |
Joonyoung Shim | 4cf51c3 | 2010-07-14 21:55:30 -0700 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2010 Samsung Electronics Co.Ltd |
| 5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> |
Mohan Pallaka | 382d3ce | 2012-01-02 20:24:28 +0800 | [diff] [blame] | 6 | * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Joonyoung Shim | 4cf51c3 | 2010-07-14 21:55:30 -0700 | [diff] [blame] | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU General Public License as published by the |
| 10 | * Free Software Foundation; either version 2 of the License, or (at your |
| 11 | * option) any later version. |
| 12 | */ |
| 13 | |
Iiro Valkonen | 7686b10 | 2011-02-02 23:21:58 -0800 | [diff] [blame] | 14 | #ifndef __LINUX_ATMEL_MXT_TS_H |
| 15 | #define __LINUX_ATMEL_MXT_TS_H |
Joonyoung Shim | 4cf51c3 | 2010-07-14 21:55:30 -0700 | [diff] [blame] | 16 | |
Iiro Valkonen | 71749f5 | 2011-02-15 13:36:52 -0800 | [diff] [blame] | 17 | #include <linux/types.h> |
| 18 | |
Joonyoung Shim | 4cf51c3 | 2010-07-14 21:55:30 -0700 | [diff] [blame] | 19 | /* Orient */ |
Iiro Valkonen | 7686b10 | 2011-02-02 23:21:58 -0800 | [diff] [blame] | 20 | #define MXT_NORMAL 0x0 |
| 21 | #define MXT_DIAGONAL 0x1 |
| 22 | #define MXT_HORIZONTAL_FLIP 0x2 |
| 23 | #define MXT_ROTATED_90_COUNTER 0x3 |
| 24 | #define MXT_VERTICAL_FLIP 0x4 |
| 25 | #define MXT_ROTATED_90 0x5 |
| 26 | #define MXT_ROTATED_180 0x6 |
| 27 | #define MXT_DIAGONAL_COUNTER 0x7 |
Joonyoung Shim | 4cf51c3 | 2010-07-14 21:55:30 -0700 | [diff] [blame] | 28 | |
Mohan Pallaka | 382d3ce | 2012-01-02 20:24:28 +0800 | [diff] [blame] | 29 | /* MXT_TOUCH_KEYARRAY_T15 */ |
| 30 | #define MXT_KEYARRAY_MAX_KEYS 32 |
| 31 | |
Iiro Valkonen | 7686b10 | 2011-02-02 23:21:58 -0800 | [diff] [blame] | 32 | /* The platform data for the Atmel maXTouch touchscreen driver */ |
| 33 | struct mxt_platform_data { |
Iiro Valkonen | 71749f5 | 2011-02-15 13:36:52 -0800 | [diff] [blame] | 34 | const u8 *config; |
| 35 | size_t config_length; |
| 36 | |
Joonyoung Shim | 4cf51c3 | 2010-07-14 21:55:30 -0700 | [diff] [blame] | 37 | unsigned int x_size; |
| 38 | unsigned int y_size; |
Iiro Valkonen | 919ed89 | 2011-02-15 13:36:52 -0800 | [diff] [blame] | 39 | unsigned long irqflags; |
Anirudh Ghayal | a498e4d | 2011-08-09 19:10:12 +0530 | [diff] [blame] | 40 | bool i2c_pull_up; |
Amy Maloche | 21115eb | 2011-11-02 09:04:37 -0700 | [diff] [blame] | 41 | bool digital_pwr_regulator; |
Amy Maloche | 08266db | 2011-11-04 11:07:16 -0700 | [diff] [blame] | 42 | int reset_gpio; |
| 43 | int irq_gpio; |
Mohan Pallaka | 382d3ce | 2012-01-02 20:24:28 +0800 | [diff] [blame] | 44 | int *key_codes; |
Anirudh Ghayal | a498e4d | 2011-08-09 19:10:12 +0530 | [diff] [blame] | 45 | |
Jing Lin | 2f86317 | 2011-10-17 10:56:58 -0700 | [diff] [blame] | 46 | u8(*read_chg) (void); |
Anirudh Ghayal | a498e4d | 2011-08-09 19:10:12 +0530 | [diff] [blame] | 47 | int (*init_hw) (bool); |
| 48 | int (*power_on) (bool); |
Joonyoung Shim | 4cf51c3 | 2010-07-14 21:55:30 -0700 | [diff] [blame] | 49 | }; |
| 50 | |
Iiro Valkonen | 7686b10 | 2011-02-02 23:21:58 -0800 | [diff] [blame] | 51 | #endif /* __LINUX_ATMEL_MXT_TS_H */ |