[RFC 3/6] Input: mt: document input_mt_set_matrix()
From: Benjamin Tissoires
Date: Mon Jan 19 2015 - 15:55:06 EST
Document what the function is about.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/