aboutsummaryrefslogtreecommitdiff
path: root/include/linux/ts_filter_variance.h
blob: 574cf90f3f57b9262edcb3fa81440622e3193994 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef __TS_FILTER_VARIANCE_H__
#define __TS_FILTER_VARIANCE_H__

#include <linux/ts_filter.h>

/*
 * touchscreen filter
 *
 * Variance
 *
 * Copyright (C) 2008 by Openmoko, Inc.
 * Author: Nelson Castillo <arhuaco@freaks-unidos.net>
 *
 */

struct ts_filter_variance_configuration {
	int extent;
	int window;
	int threshold;
	int attempts;
};

struct ts_filter_variance {
	struct ts_filter tsf;
	struct ts_filter_variance_configuration *config;

	int *samples[2];
	int N;			/* How many samples we have */

	int tries_left;		/* How many times we can try to get a point */
	int passed;		/* Did the samples pass the test? */
};

extern struct ts_filter_api ts_filter_variance_api;

#endif