Thread (8 messages) 8 messages, 2 authors, 2015-01-19

[RFC 3/6] Input: mt: document input_mt_set_matrix()

From: Benjamin Tissoires <hidden>
Date: 2015-01-19 20:54:14
Also in: lkml
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, input multitouch (mt) protocol, the rest · Maintainers: Dmitry Torokhov, Henrik Rydberg, Linus Torvalds

Document what the function is about.

Signed-off-by: Benjamin Tissoires <redacted>
---
 drivers/input/input-mt.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c
index b269113..0b98ac7 100644
--- a/drivers/input/input-mt.c
+++ b/drivers/input/input-mt.c
@@ -337,6 +337,21 @@ static void find_reduced_matrix(int *w, int nr, int nc, int nrc)
 	}
 }
 
+/**
+ * input_mt_set_matrix() - fill the reduced cost matrix for in-kernel tracking
+ * @mt: the input_mt handle of the current device
+ * @pos: the position array to match
+ * @num_pos: number of positions
+ *
+ * Fills the reduced cost matrix by putting in each element the square of the
+ * distance from one of the touch to each elements of the position array to
+ * match.
+ *
+ * The matrix is a reduced one, so it is filled as:
+ * w[i * num_pos + p] == distance(active_slot(i), pos[p])
+ *
+ * Returns the number of elements in the reduced matrix.
+ */
 static int input_mt_set_matrix(struct input_mt *mt,
 			       const struct input_mt_pos *pos, int num_pos)
 {
-- 
2.1.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help