PageRenderTime 20ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/include/linux/i2c/atmel_mxt_ts.h

https://github.com/airy09/android_kernel_sony_apq8064
C Header | 82 lines | 50 code | 12 blank | 20 comment | 0 complexity | 064292b60d150c805af5de92dbecc8c2 MD5 | raw file
 1/*
 2 * Atmel maXTouch Touchscreen driver
 3 *
 4 * Copyright (C) 2010 Samsung Electronics Co.Ltd
 5 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
 6 * Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
 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
14#ifndef __LINUX_ATMEL_MXT_TS_H
15#define __LINUX_ATMEL_MXT_TS_H
16
17#include <linux/types.h>
18
19/* Orient */
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
28
29/* MXT_TOUCH_KEYARRAY_T15 */
30#define MXT_KEYARRAY_MAX_KEYS	32
31
32/* Bootoader IDs */
33#define MXT_BOOTLOADER_ID_224		0x0A
34#define MXT_BOOTLOADER_ID_224E		0x06
35#define MXT_BOOTLOADER_ID_1386		0x01
36#define MXT_BOOTLOADER_ID_1386E		0x10
37
38/* Config data for a given maXTouch controller with a specific firmware */
39struct mxt_config_info {
40	const u8 *config;
41	size_t config_length;
42	u8 family_id;
43	u8 variant_id;
44	u8 version;
45	u8 build;
46	u8 bootldr_id;
47	/* Points to the firmware name to be upgraded to */
48	const char *fw_name;
49};
50
51/* The platform data for the Atmel maXTouch touchscreen driver */
52struct mxt_platform_data {
53	const struct mxt_config_info *config_array;
54	size_t config_array_size;
55
56	/* touch panel's minimum and maximum coordinates */
57	u32 panel_minx;
58	u32 panel_maxx;
59	u32 panel_miny;
60	u32 panel_maxy;
61
62	/* display's minimum and maximum coordinates */
63	u32 disp_minx;
64	u32 disp_maxx;
65	u32 disp_miny;
66	u32 disp_maxy;
67
68	unsigned long irqflags;
69	bool	i2c_pull_up;
70	bool	digital_pwr_regulator;
71	int reset_gpio;
72	u32 reset_gpio_flags;
73	int irq_gpio;
74	u32 irq_gpio_flags;
75	int *key_codes;
76
77	u8(*read_chg) (void);
78	int (*init_hw) (bool);
79	int (*power_on) (bool);
80};
81
82#endif /* __LINUX_ATMEL_MXT_TS_H */