[PATCH 2/3] Move touchscreen filter includes

Nelson arhuaco at freaks-unidos.net
Sat Jan 17 01:52:07 CET 2009


From: Nelson Castillo <arhuaco at freaks-unidos.net>

This patch just moves the touchscreen filter header files
around, with no modifications. The kernel will not compile
after this patch and another patch will be needed to modify
the actual #includes. I read it's better not to modify files
when you move them around.

Signed-off-by: Nelson Castillo <arhuaco at freaks-unidos.net>
---

 0 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/drivers/input/touchscreen/ts_filter.h b/drivers/input/touchscreen/ts_filter.h
new file mode 100644
index 0000000..5578e93
--- /dev/null
+++ b/drivers/input/touchscreen/ts_filter.h
@@ -0,0 +1,57 @@
+#ifndef __TS_FILTER_H__
+#define __TS_FILTER_H__
+
+/*
+ * Touchscreen filter.
+ *
+ * (c) 2008 Andy Green <andy at openmoko.com>
+ */
+
+#include <linux/platform_device.h>
+
+#define MAX_TS_FILTER_CHAIN		8  /* Max. filters we can chain up. */
+#define MAX_TS_FILTER_COORDS		3  /* X, Y and Z (pressure). */
+
+struct ts_filter;
+
+/* Operations that a filter can perform. */
+
+struct ts_filter_api {
+	struct ts_filter * (*create)(struct platform_device *pdev, void *config,
+				     int count_coords);
+	void (*destroy)(struct platform_device *pdev, struct ts_filter *filter);
+	void (*clear)(struct ts_filter *filter);
+	int (*process)(struct ts_filter *filter, int *coords);
+	void (*scale)(struct ts_filter *filter, int *coords);
+};
+
+/*
+ * This is the common part of all filters.
+ * We use this type as an otherwise opaque handle on to
+ * the actual filter.  Therefore you need one of these
+ * at the start of your actual filter struct.
+ */
+
+struct ts_filter {
+	struct ts_filter *next;		/* Next in chain. */
+	struct ts_filter_api *api;	/* Operations to use for this object. */
+	int count_coords;
+	int coords[MAX_TS_FILTER_COORDS];
+};
+
+/*
+ * Helper to create a filter chain from an array of API pointers and
+ * array of config ints. Leaves pointers to created filters in arr
+ * array and fills in ->next pointers to create the chain.
+ */
+
+extern int ts_filter_create_chain(struct platform_device *pdev,
+				  struct ts_filter_api **api, void **config,
+				  struct ts_filter **arr, int count_coords);
+
+/* Helper to destroy a whole chain from the list of filter pointers. */
+
+extern void ts_filter_destroy_chain(struct platform_device *pdev,
+				    struct ts_filter **arr);
+
+#endif
diff --git a/drivers/input/touchscreen/ts_filter_group.h b/drivers/input/touchscreen/ts_filter_group.h
new file mode 100644
index 0000000..1e74c8d
--- /dev/null
+++ b/drivers/input/touchscreen/ts_filter_group.h
@@ -0,0 +1,39 @@
+#ifndef __TS_FILTER_GROUP_H__
+#define __TS_FILTER_GROUP_H__
+
+#include <linux/ts_filter.h>
+
+/*
+ * Touchscreen group filter.
+ *
+ * Copyright (C) 2008 by Openmoko, Inc.
+ * Author: Nelson Castillo <arhuaco at freaks-unidos.net>
+ *
+ */
+
+struct ts_filter_group_configuration {
+	int extent;
+	int close_enough;
+	int threshold;
+	int attempts;
+};
+
+struct ts_filter_group {
+	struct ts_filter tsf;
+	struct ts_filter_group_configuration *config;
+
+	int N;		/* How many samples we have */
+	int *samples[MAX_TS_FILTER_COORDS];	/* the samples, our input */
+
+	int *group_size;	/* used for temporal computations */
+	int *sorted_samples;	/* used for temporal computations */
+
+	int range_max[MAX_TS_FILTER_COORDS];	/* max computed ranges */
+	int range_min[MAX_TS_FILTER_COORDS];	/* min computed ranges */
+
+	int tries_left;		/* We finish if we don't get enough samples */
+};
+
+extern struct ts_filter_api ts_filter_group_api;
+
+#endif
diff --git a/drivers/input/touchscreen/ts_filter_linear.h b/drivers/input/touchscreen/ts_filter_linear.h
new file mode 100644
index 0000000..b4dd8e4
--- /dev/null
+++ b/drivers/input/touchscreen/ts_filter_linear.h
@@ -0,0 +1,64 @@
+#ifndef __TS_FILTER_LINEAR_H__
+#define __TS_FILTER_LINEAR_H__
+
+#include <linux/ts_filter.h>
+#include <linux/kobject.h>
+
+/*
+ * Touchscreen linear filter.
+ *
+ * Copyright (C) 2008 by Openmoko, Inc.
+ * Author: Nelson Castillo <arhuaco at freaks-unidos.net>
+ *
+ */
+
+#define TS_FILTER_LINEAR_NCONSTANTS 7
+
+/* sysfs */
+
+struct ts_filter_linear;
+
+struct const_obj {
+	struct ts_filter_linear *tsfl;
+	struct kobject kobj;
+};
+
+#define to_const_obj(x) container_of(x, struct const_obj, kobj)
+
+struct const_attribute {
+	struct attribute attr;
+	ssize_t (*show)(struct const_obj *const, struct const_attribute *attr,
+			char *buf);
+	ssize_t (*store)(struct const_obj *const, struct const_attribute *attr,
+			 const char *buf, size_t count);
+};
+
+#define to_const_attr(x) container_of(x, struct const_attribute, attr)
+
+/* filter configuration */
+
+struct ts_filter_linear_configuration {
+	int constants[TS_FILTER_LINEAR_NCONSTANTS];
+	int coord0;
+	int coord1;
+};
+
+/* the filter */
+
+struct ts_filter_linear {
+	struct ts_filter tsf;
+	struct ts_filter_linear_configuration *config;
+
+	int constants[TS_FILTER_LINEAR_NCONSTANTS];
+
+	/* sysfs */
+	struct const_obj c_obj;
+	struct kobj_type const_ktype;
+	struct const_attribute kattrs[TS_FILTER_LINEAR_NCONSTANTS];
+	struct attribute *attrs[TS_FILTER_LINEAR_NCONSTANTS + 1];
+	char attr_names[TS_FILTER_LINEAR_NCONSTANTS][2];
+};
+
+extern struct ts_filter_api ts_filter_linear_api;
+
+#endif
diff --git a/drivers/input/touchscreen/ts_filter_mean.h b/drivers/input/touchscreen/ts_filter_mean.h
new file mode 100644
index 0000000..7bf7df6
--- /dev/null
+++ b/drivers/input/touchscreen/ts_filter_mean.h
@@ -0,0 +1,34 @@
+#ifndef __TS_FILTER_MEAN_H__
+#define __TS_FILTER_MEAN_H__
+
+#include <linux/ts_filter.h>
+
+/*
+ * Touchscreen filter.
+ *
+ * mean
+ *
+ * (c) 2008 Andy Green <andy at openmoko.com>
+ */
+
+struct ts_filter_mean_configuration {
+	int bits_filter_length;
+	int averaging_threshold;
+
+	int extent;
+};
+
+struct ts_filter_mean {
+	struct ts_filter tsf;
+	struct ts_filter_mean_configuration *config;
+
+	int reported[MAX_TS_FILTER_COORDS];
+	int lowpass[MAX_TS_FILTER_COORDS];
+	int *fifo[MAX_TS_FILTER_COORDS];
+	int fhead[MAX_TS_FILTER_COORDS];
+	int ftail[MAX_TS_FILTER_COORDS];
+};
+
+extern struct ts_filter_api ts_filter_mean_api;
+
+#endif
diff --git a/drivers/input/touchscreen/ts_filter_median.h b/drivers/input/touchscreen/ts_filter_median.h
new file mode 100644
index 0000000..eb56eaa
--- /dev/null
+++ b/drivers/input/touchscreen/ts_filter_median.h
@@ -0,0 +1,36 @@
+#ifndef __TS_FILTER_MEDIAN_H__
+#define __TS_FILTER_MEDIAN_H__
+
+#include <linux/ts_filter.h>
+
+/*
+ * Touchscreen filter.
+ *
+ * median
+ *
+ * (c) 2008 Andy Green <andy at openmoko.com>
+ */
+
+struct ts_filter_median_configuration {
+	int extent;
+	int midpoint;
+	int decimation_threshold;
+	int decimation_above;
+	int decimation_below;
+};
+
+struct ts_filter_median {
+	struct ts_filter tsf;
+	struct ts_filter_median_configuration *config;
+
+	int decimation_count;
+	int last_issued[MAX_TS_FILTER_COORDS];
+	int valid; /* how many samples in the sort buffer are valid */
+	int *sort[MAX_TS_FILTER_COORDS]; /* samples taken for median */
+	int *fifo[MAX_TS_FILTER_COORDS]; /* samples taken for median */
+	int pos; /* where we are in the fifo sample memory */
+};
+
+extern struct ts_filter_api ts_filter_median_api;
+
+#endif
diff --git a/include/linux/ts_filter.h b/include/linux/ts_filter.h
deleted file mode 100644
index 5578e93..0000000
--- a/include/linux/ts_filter.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef __TS_FILTER_H__
-#define __TS_FILTER_H__
-
-/*
- * Touchscreen filter.
- *
- * (c) 2008 Andy Green <andy at openmoko.com>
- */
-
-#include <linux/platform_device.h>
-
-#define MAX_TS_FILTER_CHAIN		8  /* Max. filters we can chain up. */
-#define MAX_TS_FILTER_COORDS		3  /* X, Y and Z (pressure). */
-
-struct ts_filter;
-
-/* Operations that a filter can perform. */
-
-struct ts_filter_api {
-	struct ts_filter * (*create)(struct platform_device *pdev, void *config,
-				     int count_coords);
-	void (*destroy)(struct platform_device *pdev, struct ts_filter *filter);
-	void (*clear)(struct ts_filter *filter);
-	int (*process)(struct ts_filter *filter, int *coords);
-	void (*scale)(struct ts_filter *filter, int *coords);
-};
-
-/*
- * This is the common part of all filters.
- * We use this type as an otherwise opaque handle on to
- * the actual filter.  Therefore you need one of these
- * at the start of your actual filter struct.
- */
-
-struct ts_filter {
-	struct ts_filter *next;		/* Next in chain. */
-	struct ts_filter_api *api;	/* Operations to use for this object. */
-	int count_coords;
-	int coords[MAX_TS_FILTER_COORDS];
-};
-
-/*
- * Helper to create a filter chain from an array of API pointers and
- * array of config ints. Leaves pointers to created filters in arr
- * array and fills in ->next pointers to create the chain.
- */
-
-extern int ts_filter_create_chain(struct platform_device *pdev,
-				  struct ts_filter_api **api, void **config,
-				  struct ts_filter **arr, int count_coords);
-
-/* Helper to destroy a whole chain from the list of filter pointers. */
-
-extern void ts_filter_destroy_chain(struct platform_device *pdev,
-				    struct ts_filter **arr);
-
-#endif
diff --git a/include/linux/ts_filter_group.h b/include/linux/ts_filter_group.h
deleted file mode 100644
index 1e74c8d..0000000
--- a/include/linux/ts_filter_group.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef __TS_FILTER_GROUP_H__
-#define __TS_FILTER_GROUP_H__
-
-#include <linux/ts_filter.h>
-
-/*
- * Touchscreen group filter.
- *
- * Copyright (C) 2008 by Openmoko, Inc.
- * Author: Nelson Castillo <arhuaco at freaks-unidos.net>
- *
- */
-
-struct ts_filter_group_configuration {
-	int extent;
-	int close_enough;
-	int threshold;
-	int attempts;
-};
-
-struct ts_filter_group {
-	struct ts_filter tsf;
-	struct ts_filter_group_configuration *config;
-
-	int N;		/* How many samples we have */
-	int *samples[MAX_TS_FILTER_COORDS];	/* the samples, our input */
-
-	int *group_size;	/* used for temporal computations */
-	int *sorted_samples;	/* used for temporal computations */
-
-	int range_max[MAX_TS_FILTER_COORDS];	/* max computed ranges */
-	int range_min[MAX_TS_FILTER_COORDS];	/* min computed ranges */
-
-	int tries_left;		/* We finish if we don't get enough samples */
-};
-
-extern struct ts_filter_api ts_filter_group_api;
-
-#endif
diff --git a/include/linux/ts_filter_linear.h b/include/linux/ts_filter_linear.h
deleted file mode 100644
index b4dd8e4..0000000
--- a/include/linux/ts_filter_linear.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef __TS_FILTER_LINEAR_H__
-#define __TS_FILTER_LINEAR_H__
-
-#include <linux/ts_filter.h>
-#include <linux/kobject.h>
-
-/*
- * Touchscreen linear filter.
- *
- * Copyright (C) 2008 by Openmoko, Inc.
- * Author: Nelson Castillo <arhuaco at freaks-unidos.net>
- *
- */
-
-#define TS_FILTER_LINEAR_NCONSTANTS 7
-
-/* sysfs */
-
-struct ts_filter_linear;
-
-struct const_obj {
-	struct ts_filter_linear *tsfl;
-	struct kobject kobj;
-};
-
-#define to_const_obj(x) container_of(x, struct const_obj, kobj)
-
-struct const_attribute {
-	struct attribute attr;
-	ssize_t (*show)(struct const_obj *const, struct const_attribute *attr,
-			char *buf);
-	ssize_t (*store)(struct const_obj *const, struct const_attribute *attr,
-			 const char *buf, size_t count);
-};
-
-#define to_const_attr(x) container_of(x, struct const_attribute, attr)
-
-/* filter configuration */
-
-struct ts_filter_linear_configuration {
-	int constants[TS_FILTER_LINEAR_NCONSTANTS];
-	int coord0;
-	int coord1;
-};
-
-/* the filter */
-
-struct ts_filter_linear {
-	struct ts_filter tsf;
-	struct ts_filter_linear_configuration *config;
-
-	int constants[TS_FILTER_LINEAR_NCONSTANTS];
-
-	/* sysfs */
-	struct const_obj c_obj;
-	struct kobj_type const_ktype;
-	struct const_attribute kattrs[TS_FILTER_LINEAR_NCONSTANTS];
-	struct attribute *attrs[TS_FILTER_LINEAR_NCONSTANTS + 1];
-	char attr_names[TS_FILTER_LINEAR_NCONSTANTS][2];
-};
-
-extern struct ts_filter_api ts_filter_linear_api;
-
-#endif
diff --git a/include/linux/ts_filter_mean.h b/include/linux/ts_filter_mean.h
deleted file mode 100644
index 7bf7df6..0000000
--- a/include/linux/ts_filter_mean.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef __TS_FILTER_MEAN_H__
-#define __TS_FILTER_MEAN_H__
-
-#include <linux/ts_filter.h>
-
-/*
- * Touchscreen filter.
- *
- * mean
- *
- * (c) 2008 Andy Green <andy at openmoko.com>
- */
-
-struct ts_filter_mean_configuration {
-	int bits_filter_length;
-	int averaging_threshold;
-
-	int extent;
-};
-
-struct ts_filter_mean {
-	struct ts_filter tsf;
-	struct ts_filter_mean_configuration *config;
-
-	int reported[MAX_TS_FILTER_COORDS];
-	int lowpass[MAX_TS_FILTER_COORDS];
-	int *fifo[MAX_TS_FILTER_COORDS];
-	int fhead[MAX_TS_FILTER_COORDS];
-	int ftail[MAX_TS_FILTER_COORDS];
-};
-
-extern struct ts_filter_api ts_filter_mean_api;
-
-#endif
diff --git a/include/linux/ts_filter_median.h b/include/linux/ts_filter_median.h
deleted file mode 100644
index eb56eaa..0000000
--- a/include/linux/ts_filter_median.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef __TS_FILTER_MEDIAN_H__
-#define __TS_FILTER_MEDIAN_H__
-
-#include <linux/ts_filter.h>
-
-/*
- * Touchscreen filter.
- *
- * median
- *
- * (c) 2008 Andy Green <andy at openmoko.com>
- */
-
-struct ts_filter_median_configuration {
-	int extent;
-	int midpoint;
-	int decimation_threshold;
-	int decimation_above;
-	int decimation_below;
-};
-
-struct ts_filter_median {
-	struct ts_filter tsf;
-	struct ts_filter_median_configuration *config;
-
-	int decimation_count;
-	int last_issued[MAX_TS_FILTER_COORDS];
-	int valid; /* how many samples in the sort buffer are valid */
-	int *sort[MAX_TS_FILTER_COORDS]; /* samples taken for median */
-	int *fifo[MAX_TS_FILTER_COORDS]; /* samples taken for median */
-	int pos; /* where we are in the fifo sample memory */
-};
-
-extern struct ts_filter_api ts_filter_median_api;
-
-#endif




More information about the openmoko-kernel mailing list