blob: 9aa557aea1ba5f9c9bda5080dc51a298a67be074 [file] [log] [blame]
Joonyoung Shim4cf51c32010-07-14 21:55:30 -07001/*
Iiro Valkonen7686b102011-02-02 23:21:58 -08002 * Atmel maXTouch Touchscreen driver
Joonyoung Shim4cf51c32010-07-14 21:55:30 -07003 *
4 * Copyright (C) 2010 Samsung Electronics Co.Ltd
5 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
Mohan Pallaka382d3ce2012-01-02 20:24:28 +08006 * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Joonyoung Shim4cf51c32010-07-14 21:55:30 -07007 *
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 Valkonen7686b102011-02-02 23:21:58 -080014#ifndef __LINUX_ATMEL_MXT_TS_H
15#define __LINUX_ATMEL_MXT_TS_H
Joonyoung Shim4cf51c32010-07-14 21:55:30 -070016
Iiro Valkonen71749f52011-02-15 13:36:52 -080017#include <linux/types.h>
18
Joonyoung Shim4cf51c32010-07-14 21:55:30 -070019/* Orient */
Iiro Valkonen7686b102011-02-02 23:21:58 -080020#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 Shim4cf51c32010-07-14 21:55:30 -070028
Mohan Pallaka382d3ce2012-01-02 20:24:28 +080029/* MXT_TOUCH_KEYARRAY_T15 */
30#define MXT_KEYARRAY_MAX_KEYS 32
31
Iiro Valkonen7686b102011-02-02 23:21:58 -080032/* The platform data for the Atmel maXTouch touchscreen driver */
33struct mxt_platform_data {
Iiro Valkonen71749f52011-02-15 13:36:52 -080034 const u8 *config;
35 size_t config_length;
36
Joonyoung Shim4cf51c32010-07-14 21:55:30 -070037 unsigned int x_size;
38 unsigned int y_size;
Iiro Valkonen919ed892011-02-15 13:36:52 -080039 unsigned long irqflags;
Anirudh Ghayala498e4d2011-08-09 19:10:12 +053040 bool i2c_pull_up;
Amy Maloche21115eb2011-11-02 09:04:37 -070041 bool digital_pwr_regulator;
Amy Maloche08266db2011-11-04 11:07:16 -070042 int reset_gpio;
43 int irq_gpio;
Mohan Pallaka382d3ce2012-01-02 20:24:28 +080044 int *key_codes;
Anirudh Ghayala498e4d2011-08-09 19:10:12 +053045
Jing Lin2f863172011-10-17 10:56:58 -070046 u8(*read_chg) (void);
Anirudh Ghayala498e4d2011-08-09 19:10:12 +053047 int (*init_hw) (bool);
48 int (*power_on) (bool);
Joonyoung Shim4cf51c32010-07-14 21:55:30 -070049};
50
Iiro Valkonen7686b102011-02-02 23:21:58 -080051#endif /* __LINUX_ATMEL_MXT_TS_H */