a1ef73
From: Daniel Martin <consume.noise@gmail.com>
a1ef73
Date: Sun, 8 Mar 2015 22:28:29 -0700
a1ef73
Subject: [PATCH] Input: synaptics - log queried and quirked dimension values
a1ef73
a1ef73
Logging the dimension values we queried and the values we use from a quirk
a1ef73
to overwrite can be helpful for debugging.
a1ef73
a1ef73
This partly relates to bug:
a1ef73
    https://bugzilla.kernel.org/show_bug.cgi?id=91541
a1ef73
a1ef73
Cc: stable@vger.kernel.org
a1ef73
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
a1ef73
Acked-by: Hans de Goede <hdegoede@redhat.com>
a1ef73
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
a1ef73
---
a1ef73
 drivers/input/mouse/synaptics.c | 10 ++++++++++
a1ef73
 1 file changed, 10 insertions(+)
a1ef73
a1ef73
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
a1ef73
index b501dda75dcb..47c5dca20a60 100644
a1ef73
--- a/drivers/input/mouse/synaptics.c
a1ef73
+++ b/drivers/input/mouse/synaptics.c
a1ef73
@@ -362,6 +362,9 @@ static int synaptics_resolution(struct psmouse *psmouse)
a1ef73
 		} else {
a1ef73
 			priv->x_max = (resp[0] << 5) | ((resp[1] & 0x0f) << 1);
a1ef73
 			priv->y_max = (resp[2] << 5) | ((resp[1] & 0xf0) >> 3);
a1ef73
+			psmouse_info(psmouse,
a1ef73
+				     "queried max coordinates: x [..%d], y [..%d]\n",
a1ef73
+				     priv->x_max, priv->y_max);
a1ef73
 		}
a1ef73
 	}
a1ef73
 
a1ef73
@@ -373,6 +376,9 @@ static int synaptics_resolution(struct psmouse *psmouse)
a1ef73
 		} else {
a1ef73
 			priv->x_min = (resp[0] << 5) | ((resp[1] & 0x0f) << 1);
a1ef73
 			priv->y_min = (resp[2] << 5) | ((resp[1] & 0xf0) >> 3);
a1ef73
+			psmouse_info(psmouse,
a1ef73
+				     "queried min coordinates: x [%d..], y [%d..]\n",
a1ef73
+				     priv->x_min, priv->y_min);
a1ef73
 		}
a1ef73
 	}
a1ef73
 
a1ef73
@@ -395,6 +401,10 @@ static void synaptics_apply_quirks(struct psmouse *psmouse)
a1ef73
 			priv->x_max = min_max_pnpid_table[i].x_max;
a1ef73
 			priv->y_min = min_max_pnpid_table[i].y_min;
a1ef73
 			priv->y_max = min_max_pnpid_table[i].y_max;
a1ef73
+			psmouse_info(psmouse,
a1ef73
+				     "quirked min/max coordinates: x [%d..%d], y [%d..%d]\n",
a1ef73
+				     priv->x_min, priv->x_max,
a1ef73
+				     priv->y_min, priv->y_max);
a1ef73
 			break;
a1ef73
 		}
a1ef73
 	}
a1ef73
-- 
a1ef73
2.1.0
a1ef73