Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932084Ab2FZG6T (ORCPT ); Tue, 26 Jun 2012 02:58:19 -0400 Received: from mail-ey0-f202.google.com ([209.85.215.202]:59326 "EHLO mail-ey0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757457Ab2FZG5V (ORCPT ); Tue, 26 Jun 2012 02:57:21 -0400 From: Daniel Kurtz To: Dmitry Torokhov , Henrik Rydberg , Joonyoung Shim , Nick Dyer , linux-input@vger.kernel.org Cc: Iiro Valkonen , Benson Leung , Yufeng Shen , Olof Johansson , linux-kernel@vger.kernel.org, Daniel Kurtz Subject: [PATCH 17/21 v5] Input: atmel_mxt_ts - add detail to touchevent debug message Date: Tue, 26 Jun 2012 14:57:05 +0800 Message-Id: <1340693829-18665-18-git-send-email-djkurtz@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1340693829-18665-1-git-send-email-djkurtz@chromium.org> References: <1340693829-18665-1-git-send-email-djkurtz@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1764 Lines: 53 Update the debug message: * print inidividual status bits * print the pressure value * use '%u' for unsigned quantities Signed-off-by: Daniel Kurtz --- drivers/input/touchscreen/atmel_mxt_ts.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index c4e6747..7b042e5 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -195,6 +195,7 @@ #define MXT_BOOT_STATUS_MASK 0x3f /* Touch status */ +#define MXT_UNGRIP (1 << 0) #define MXT_SUPPRESS (1 << 1) #define MXT_AMP (1 << 2) #define MXT_VECTOR (1 << 3) @@ -530,9 +531,19 @@ static void mxt_input_touchevent(struct mxt_data *data, area = message->message[4]; pressure = message->message[5]; - dev_dbg(dev, "[%d] %s x: %d, y: %d, area: %d\n", id, - status & MXT_MOVE ? "moved" : "pressed", - x, y, area); + dev_dbg(dev, + "[%u] %c%c%c%c%c%c%c%c x: %5u y: %5u area: %3u amp: %3u\n", + id, + (status & MXT_DETECT) ? 'D' : '.', + (status & MXT_PRESS) ? 'P' : '.', + (status & MXT_RELEASE) ? 'R' : '.', + (status & MXT_MOVE) ? 'M' : '.', + (status & MXT_VECTOR) ? 'V' : '.', + (status & MXT_AMP) ? 'A' : '.', + (status & MXT_SUPPRESS) ? 'S' : '.', + (status & MXT_UNGRIP) ? 'U' : '.', + x, y, area, pressure); + input_mt_slot(input_dev, id); input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, status & MXT_DETECT); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/