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