@@ -91,6 +91,7 @@ struct stmpe_touch {
u8 fraction_z;
u8 i_drive;
u8 op_mod;
+ u8 tracking_index;
struct {
struct {
u16 x;
@@ -332,8 +333,8 @@ static int stmpe_init_hw(struct stmpe_touch *ts)
return ret;
}
- tsc_ctrl = STMPE_OP_MODE(ts->op_mod);
- tsc_ctrl_mask = STMPE_OP_MODE(0xff);
+ tsc_ctrl = STMPE_TRACK(ts->tracking_index) | STMPE_OP_MODE(ts->op_mod);
+ tsc_ctrl_mask = STMPE_TRACK(0xff) | STMPE_OP_MODE(0xff);
ret = stmpe_set_bits(stmpe, STMPE_REG_TSC_CTRL,
tsc_ctrl_mask, tsc_ctrl);
@@ -16,6 +16,7 @@
#define STMPE_ADC_FREQ(x) (x & 0x3)
#define STMPE_AVE_CTRL(x) ((x & 0x3) << 6)
#define STMPE_DET_DELAY(x) ((x & 0x7) << 3)
+#define STMPE_TRACK(x) ((x & 0x7) << 4)
#define STMPE_SETTLING(x) (x & 0x7)
#define STMPE_FRACTION_Z(x) (x & 0x7)
#define STMPE_I_DRIVE(x) (x & 0x1)
The tracking index specifies an minimum distance between two touchpoints so that the latter will be discarded, if the distance falls short of the configured value. Beware: When using the XYZ acquisition mode, an increase in pressure leads to a position report anyway. Signed-off-by: Leif Middelschulte <leif.middelschulte@klsmartin.com> --- drivers/input/touchscreen/stmpe-ts.c | 5 +++-- include/linux/mfd/stmpe.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)