Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/i2c.h>
#include <linux/i2c/atmel_mxt_ts.h>
#include <linux/input/mt.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
Go to the source code of this file.
Data Structures | |
struct | mxt_info |
struct | mxt_object |
struct | mxt_message |
struct | mxt_data |
Functions | |
MODULE_DEVICE_TABLE (i2c, mxt_id) | |
module_i2c_driver (mxt_driver) | |
MODULE_AUTHOR ("Joonyoung Shim <[email protected]>") | |
MODULE_DESCRIPTION ("Atmel maXTouch Touchscreen driver") | |
MODULE_LICENSE ("GPL") | |
Variables | |
struct mxt_object | __packed |
#define MXT_ACQUIRE_ATCHCALST 6 |
Definition at line 98 of file atmel_mxt_ts.c.
#define MXT_ACQUIRE_ATCHCALSTHR 7 |
Definition at line 99 of file atmel_mxt_ts.c.
#define MXT_ACQUIRE_CHRGTIME 0 |
Definition at line 93 of file atmel_mxt_ts.c.
#define MXT_ACQUIRE_DRIFTST 3 |
Definition at line 95 of file atmel_mxt_ts.c.
#define MXT_ACQUIRE_SYNC 5 |
Definition at line 97 of file atmel_mxt_ts.c.
#define MXT_ACQUIRE_TCHAUTOCAL 4 |
Definition at line 96 of file atmel_mxt_ts.c.
#define MXT_ACQUIRE_TCHDRIFT 2 |
Definition at line 94 of file atmel_mxt_ts.c.
#define MXT_AMP (1 << 2) |
Definition at line 200 of file atmel_mxt_ts.c.
#define MXT_APP_CRC_FAIL 0x40 /* valid 7 8 bit only */ |
Definition at line 194 of file atmel_mxt_ts.c.
#define MXT_APP_HIGH 0x4b |
Definition at line 31 of file atmel_mxt_ts.c.
#define MXT_APP_LOW 0x4a |
Definition at line 30 of file atmel_mxt_ts.c.
#define MXT_BACKUP_TIME 25 /* msec */ |
Definition at line 179 of file atmel_mxt_ts.c.
#define MXT_BACKUP_VALUE 0x55 |
Definition at line 178 of file atmel_mxt_ts.c.
#define MXT_BOOT_HIGH 0x25 |
Definition at line 33 of file atmel_mxt_ts.c.
#define MXT_BOOT_LOW 0x24 |
Definition at line 32 of file atmel_mxt_ts.c.
#define MXT_BOOT_STATUS_MASK 0x3f |
Definition at line 195 of file atmel_mxt_ts.c.
#define MXT_BOOT_VALUE 0xa5 |
Definition at line 177 of file atmel_mxt_ts.c.
#define MXT_BUILD 0x03 |
Definition at line 43 of file atmel_mxt_ts.c.
#define MXT_COMMAND_BACKUPNV 1 |
Definition at line 82 of file atmel_mxt_ts.c.
#define MXT_COMMAND_CALIBRATE 2 |
Definition at line 83 of file atmel_mxt_ts.c.
#define MXT_COMMAND_DIAGNOSTIC 5 |
Definition at line 85 of file atmel_mxt_ts.c.
#define MXT_COMMAND_REPORTALL 3 |
Definition at line 84 of file atmel_mxt_ts.c.
#define MXT_COMMAND_RESET 0 |
Definition at line 81 of file atmel_mxt_ts.c.
#define MXT_COMMS_CMD 1 |
Definition at line 163 of file atmel_mxt_ts.c.
#define MXT_COMMS_CTRL 0 |
Definition at line 162 of file atmel_mxt_ts.c.
#define MXT_CTE_ACTVGCAFDEPTH 4 |
Definition at line 170 of file atmel_mxt_ts.c.
#define MXT_CTE_CMD 1 |
Definition at line 167 of file atmel_mxt_ts.c.
#define MXT_CTE_CTRL 0 |
Definition at line 166 of file atmel_mxt_ts.c.
#define MXT_CTE_IDLEGCAFDEPTH 3 |
Definition at line 169 of file atmel_mxt_ts.c.
#define MXT_CTE_MODE 2 |
Definition at line 168 of file atmel_mxt_ts.c.
#define MXT_CTE_VOLTAGE 5 |
Definition at line 171 of file atmel_mxt_ts.c.
#define MXT_DEBUG_DIAGNOSTIC_T37 37 |
Definition at line 52 of file atmel_mxt_ts.c.
#define MXT_DETECT (1 << 7) |
Definition at line 205 of file atmel_mxt_ts.c.
#define MXT_FAMILY_ID 0x00 |
Definition at line 40 of file atmel_mxt_ts.c.
#define MXT_FRAME_CRC_CHECK 0x02 |
Definition at line 191 of file atmel_mxt_ts.c.
#define MXT_FRAME_CRC_FAIL 0x03 |
Definition at line 192 of file atmel_mxt_ts.c.
#define MXT_FRAME_CRC_PASS 0x04 |
Definition at line 193 of file atmel_mxt_ts.c.
#define MXT_FW_NAME "maxtouch.fw" |
Definition at line 36 of file atmel_mxt_ts.c.
#define MXT_FWRESET_TIME 175 /* msec */ |
Definition at line 182 of file atmel_mxt_ts.c.
#define MXT_GEN_ACQUIRE_T8 8 |
Definition at line 56 of file atmel_mxt_ts.c.
#define MXT_GEN_COMMAND_T6 6 |
Definition at line 54 of file atmel_mxt_ts.c.
#define MXT_GEN_DATASOURCE_T53 53 |
Definition at line 57 of file atmel_mxt_ts.c.
#define MXT_GEN_MESSAGE_T5 5 |
Definition at line 53 of file atmel_mxt_ts.c.
#define MXT_GEN_POWER_T7 7 |
Definition at line 55 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_CTRL 0 |
Definition at line 132 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_MAXTCHS 5 |
Definition at line 137 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_SHPTHR1 9 |
Definition at line 140 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_SHPTHR2 10 |
Definition at line 141 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_SUPEXTTO 11 |
Definition at line 142 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_SZTHR1 7 |
Definition at line 138 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_SZTHR2 8 |
Definition at line 139 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_XHIGRIP 2 |
Definition at line 134 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_XLOGRIP 1 |
Definition at line 133 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_YHIGRIP 4 |
Definition at line 136 of file atmel_mxt_ts.c.
#define MXT_GRIPFACE_YLOGRIP 3 |
Definition at line 135 of file atmel_mxt_ts.c.
#define MXT_INFO 0x00 |
Definition at line 39 of file atmel_mxt_ts.c.
#define MXT_MATRIX_X_SIZE 0x04 |
Definition at line 44 of file atmel_mxt_ts.c.
#define MXT_MATRIX_Y_SIZE 0x05 |
Definition at line 45 of file atmel_mxt_ts.c.
#define MXT_MAX_AREA 0xff |
Definition at line 213 of file atmel_mxt_ts.c.
#define MXT_MOVE (1 << 4) |
Definition at line 202 of file atmel_mxt_ts.c.
#define MXT_NOISE_ACTVGCAFVALID 7 |
Definition at line 151 of file atmel_mxt_ts.c.
#define MXT_NOISE_CTRL 0 |
Definition at line 145 of file atmel_mxt_ts.c.
#define MXT_NOISE_FREQ0 11 |
Definition at line 154 of file atmel_mxt_ts.c.
#define MXT_NOISE_FREQ1 12 |
Definition at line 155 of file atmel_mxt_ts.c.
#define MXT_NOISE_FREQ2 13 |
Definition at line 156 of file atmel_mxt_ts.c.
#define MXT_NOISE_FREQ3 14 |
Definition at line 157 of file atmel_mxt_ts.c.
#define MXT_NOISE_FREQ4 15 |
Definition at line 158 of file atmel_mxt_ts.c.
#define MXT_NOISE_FREQHOPSCALE 10 |
Definition at line 153 of file atmel_mxt_ts.c.
#define MXT_NOISE_GCAFLL_LSB 5 |
Definition at line 149 of file atmel_mxt_ts.c.
#define MXT_NOISE_GCAFLL_MSB 6 |
Definition at line 150 of file atmel_mxt_ts.c.
#define MXT_NOISE_GCAFUL_LSB 3 |
Definition at line 147 of file atmel_mxt_ts.c.
#define MXT_NOISE_GCAFUL_MSB 4 |
Definition at line 148 of file atmel_mxt_ts.c.
#define MXT_NOISE_IDLEGCAFVALID 16 |
Definition at line 159 of file atmel_mxt_ts.c.
#define MXT_NOISE_NOISETHR 8 |
Definition at line 152 of file atmel_mxt_ts.c.
#define MXT_NOISE_OUTFLEN 1 |
Definition at line 146 of file atmel_mxt_ts.c.
#define MXT_OBJECT_NUM 0x06 |
Definition at line 46 of file atmel_mxt_ts.c.
#define MXT_OBJECT_SIZE 6 |
Definition at line 49 of file atmel_mxt_ts.c.
#define MXT_OBJECT_START 0x07 |
Definition at line 47 of file atmel_mxt_ts.c.
#define MXT_POWER_ACTV2IDLETO 2 |
Definition at line 90 of file atmel_mxt_ts.c.
#define MXT_POWER_ACTVACQINT 1 |
Definition at line 89 of file atmel_mxt_ts.c.
#define MXT_POWER_IDLEACQINT 0 |
Definition at line 88 of file atmel_mxt_ts.c.
#define MXT_PRESS (1 << 6) |
Definition at line 204 of file atmel_mxt_ts.c.
#define MXT_PROCG_NOISE_T22 22 |
Definition at line 63 of file atmel_mxt_ts.c.
#define MXT_PROCG_NOISESUPPRESSION_T48 48 |
Definition at line 70 of file atmel_mxt_ts.c.
#define MXT_PROCI_GRIP_T40 40 |
Definition at line 66 of file atmel_mxt_ts.c.
#define MXT_PROCI_GRIPFACE_T20 20 |
Definition at line 62 of file atmel_mxt_ts.c.
#define MXT_PROCI_ONETOUCH_T24 24 |
Definition at line 64 of file atmel_mxt_ts.c.
#define MXT_PROCI_PALM_T41 41 |
Definition at line 67 of file atmel_mxt_ts.c.
#define MXT_PROCI_STYLUS_T47 47 |
Definition at line 69 of file atmel_mxt_ts.c.
#define MXT_PROCI_TOUCHSUPPRESSION_T42 42 |
Definition at line 68 of file atmel_mxt_ts.c.
#define MXT_PROCI_TWOTOUCH_T27 27 |
Definition at line 65 of file atmel_mxt_ts.c.
#define MXT_RELEASE (1 << 5) |
Definition at line 203 of file atmel_mxt_ts.c.
#define MXT_RESET_TIME 65 /* msec */ |
Definition at line 180 of file atmel_mxt_ts.c.
#define MXT_SPT_COMMSCONFIG_T18 18 |
Definition at line 71 of file atmel_mxt_ts.c.
#define MXT_SPT_CTECONFIG_T28 28 |
Definition at line 74 of file atmel_mxt_ts.c.
#define MXT_SPT_CTECONFIG_T46 46 |
Definition at line 78 of file atmel_mxt_ts.c.
#define MXT_SPT_DIGITIZER_T43 43 |
Definition at line 76 of file atmel_mxt_ts.c.
#define MXT_SPT_GPIOPWM_T19 19 |
Definition at line 72 of file atmel_mxt_ts.c.
#define MXT_SPT_MESSAGECOUNT_T44 44 |
Definition at line 77 of file atmel_mxt_ts.c.
#define MXT_SPT_SELFTEST_T25 25 |
Definition at line 73 of file atmel_mxt_ts.c.
#define MXT_SPT_USERDATA_T38 38 |
Definition at line 75 of file atmel_mxt_ts.c.
#define MXT_SUPPRESS (1 << 1) |
Definition at line 199 of file atmel_mxt_ts.c.
#define MXT_TOUCH_AMPHYST 17 |
Definition at line 116 of file atmel_mxt_ts.c.
#define MXT_TOUCH_BLEN 6 |
Definition at line 107 of file atmel_mxt_ts.c.
#define MXT_TOUCH_CTRL 0 |
Definition at line 102 of file atmel_mxt_ts.c.
#define MXT_TOUCH_JUMPLIMIT 30 |
Definition at line 129 of file atmel_mxt_ts.c.
#define MXT_TOUCH_KEYARRAY_T15 15 |
Definition at line 59 of file atmel_mxt_ts.c.
#define MXT_TOUCH_MOVHYSTI 11 |
Definition at line 111 of file atmel_mxt_ts.c.
#define MXT_TOUCH_MOVHYSTN 12 |
Definition at line 112 of file atmel_mxt_ts.c.
#define MXT_TOUCH_MRGHYST 15 |
Definition at line 114 of file atmel_mxt_ts.c.
#define MXT_TOUCH_MRGTHR 16 |
Definition at line 115 of file atmel_mxt_ts.c.
#define MXT_TOUCH_MULTI_T9 9 |
Definition at line 58 of file atmel_mxt_ts.c.
#define MXT_TOUCH_NUMTOUCH 14 |
Definition at line 113 of file atmel_mxt_ts.c.
#define MXT_TOUCH_ORIENT 9 |
Definition at line 110 of file atmel_mxt_ts.c.
#define MXT_TOUCH_PROXIMITY_T23 23 |
Definition at line 60 of file atmel_mxt_ts.c.
#define MXT_TOUCH_PROXKEY_T52 52 |
Definition at line 61 of file atmel_mxt_ts.c.
#define MXT_TOUCH_TCHDI 8 |
Definition at line 109 of file atmel_mxt_ts.c.
#define MXT_TOUCH_TCHTHR 7 |
Definition at line 108 of file atmel_mxt_ts.c.
#define MXT_TOUCH_XEDGECTRL 26 |
Definition at line 125 of file atmel_mxt_ts.c.
#define MXT_TOUCH_XEDGEDIST 27 |
Definition at line 126 of file atmel_mxt_ts.c.
#define MXT_TOUCH_XHICLIP 23 |
Definition at line 122 of file atmel_mxt_ts.c.
#define MXT_TOUCH_XLOCLIP 22 |
Definition at line 121 of file atmel_mxt_ts.c.
#define MXT_TOUCH_XORIGIN 1 |
Definition at line 103 of file atmel_mxt_ts.c.
#define MXT_TOUCH_XRANGE_LSB 18 |
Definition at line 117 of file atmel_mxt_ts.c.
#define MXT_TOUCH_XRANGE_MSB 19 |
Definition at line 118 of file atmel_mxt_ts.c.
#define MXT_TOUCH_XSIZE 3 |
Definition at line 105 of file atmel_mxt_ts.c.
#define MXT_TOUCH_YEDGECTRL 28 |
Definition at line 127 of file atmel_mxt_ts.c.
#define MXT_TOUCH_YEDGEDIST 29 |
Definition at line 128 of file atmel_mxt_ts.c.
#define MXT_TOUCH_YHICLIP 25 |
Definition at line 124 of file atmel_mxt_ts.c.
#define MXT_TOUCH_YLOCLIP 24 |
Definition at line 123 of file atmel_mxt_ts.c.
#define MXT_TOUCH_YORIGIN 2 |
Definition at line 104 of file atmel_mxt_ts.c.
#define MXT_TOUCH_YRANGE_LSB 20 |
Definition at line 119 of file atmel_mxt_ts.c.
#define MXT_TOUCH_YRANGE_MSB 21 |
Definition at line 120 of file atmel_mxt_ts.c.
#define MXT_TOUCH_YSIZE 4 |
Definition at line 106 of file atmel_mxt_ts.c.
#define MXT_UNGRIP (1 << 0) |
Definition at line 198 of file atmel_mxt_ts.c.
#define MXT_UNLOCK_CMD_LSB 0xdc |
Definition at line 186 of file atmel_mxt_ts.c.
#define MXT_UNLOCK_CMD_MSB 0xaa |
Definition at line 185 of file atmel_mxt_ts.c.
#define MXT_VARIANT_ID 0x01 |
Definition at line 41 of file atmel_mxt_ts.c.
#define MXT_VECTOR (1 << 3) |
Definition at line 201 of file atmel_mxt_ts.c.
#define MXT_VER_20 20 |
Definition at line 25 of file atmel_mxt_ts.c.
#define MXT_VER_21 21 |
Definition at line 26 of file atmel_mxt_ts.c.
#define MXT_VER_22 22 |
Definition at line 27 of file atmel_mxt_ts.c.
#define MXT_VERSION 0x02 |
Definition at line 42 of file atmel_mxt_ts.c.
#define MXT_VOLTAGE_DEFAULT 2700000 |
Definition at line 173 of file atmel_mxt_ts.c.
#define MXT_VOLTAGE_STEP 10000 |
Definition at line 174 of file atmel_mxt_ts.c.
#define MXT_WAITING_BOOTLOAD_CMD 0xc0 /* valid 7 6 bit only */ |
Definition at line 189 of file atmel_mxt_ts.c.
#define MXT_WAITING_FRAME_DATA 0x80 /* valid 7 6 bit only */ |
Definition at line 190 of file atmel_mxt_ts.c.
#define MXT_X_INVERT (1 << 1) |
Definition at line 209 of file atmel_mxt_ts.c.
#define MXT_XY_SWITCH (1 << 0) |
Definition at line 208 of file atmel_mxt_ts.c.
#define MXT_Y_INVERT (1 << 2) |
Definition at line 210 of file atmel_mxt_ts.c.
MODULE_AUTHOR | ( | "Joonyoung Shim <[email protected]>" | ) |
MODULE_DESCRIPTION | ( | "Atmel maXTouch Touchscreen driver" | ) |
MODULE_DEVICE_TABLE | ( | i2c | , |
mxt_id | |||
) |
module_i2c_driver | ( | mxt_driver | ) |
MODULE_LICENSE | ( | "GPL" | ) |