From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Tissoires Subject: [RFC 3/6] Input: mt: document input_mt_set_matrix() Date: Mon, 19 Jan 2015 15:53:52 -0500 Message-ID: <1421700835-22157-4-git-send-email-benjamin.tissoires@redhat.com> References: <1421700835-22157-1-git-send-email-benjamin.tissoires@redhat.com> Return-path: In-Reply-To: <1421700835-22157-1-git-send-email-benjamin.tissoires@redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: Henrik Rydberg , Dmitry Torokhov , Hans de Goede Cc: Peter Hutterer , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-input@vger.kernel.org Document what the function is about. Signed-off-by: Benjamin Tissoires --- 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