S3C: Backported openmoko's touchscreen filters
[linux-2.6/mini2440.git] / drivers / input / touchscreen / ts_filter_group.h
blobc411080eae22bdcea753d0962d5c0eeeda8822e3
1 #ifndef __TS_FILTER_GROUP_H__
2 #define __TS_FILTER_GROUP_H__
4 #include "ts_filter.h"
6 /*
7 * Touchscreen group filter.
9 * Copyright (C) 2008 by Openmoko, Inc.
10 * Author: Nelson Castillo <arhuaco@freaks-unidos.net>
14 struct ts_filter_group_configuration {
15 int extent;
16 int close_enough;
17 int threshold;
18 int attempts;
21 struct ts_filter_group {
22 struct ts_filter tsf;
23 struct ts_filter_group_configuration *config;
25 int N; /* How many samples we have */
26 int *samples[MAX_TS_FILTER_COORDS]; /* the samples, our input */
28 int *group_size; /* used for temporal computations */
29 int *sorted_samples; /* used for temporal computations */
31 int range_max[MAX_TS_FILTER_COORDS]; /* max computed ranges */
32 int range_min[MAX_TS_FILTER_COORDS]; /* min computed ranges */
34 int tries_left; /* We finish if we don't get enough samples */
37 extern struct ts_filter_api ts_filter_group_api;
39 #endif