diff mbox series

[v3,3/3] input: goodix: Print values in case of inconsistencies

Message ID c2f48f779b64478cb7e0c63e3a2ee19e160d1292.1550239328.git.agx@sigxcpu.org (mailing list archive)
State Mainlined
Commit c1c00aa53a636d635d9bfad15652fa0694b54f9d
Headers show
Series input: goodix - support Goodix gt5688 | expand

Commit Message

Guido Günther Feb. 15, 2019, 2:11 p.m. UTC
"Invalid config" gives little idea what's wrong. Print the values that
must not be 0 so we know which ones are off.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
---
 drivers/input/touchscreen/goodix.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index 47b1ced41576..f57d82220a88 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -693,7 +693,9 @@  static int goodix_configure_dev(struct goodix_ts_data *ts)
 	touchscreen_parse_properties(ts->input_dev, true, &ts->prop);
 
 	if (!ts->prop.max_x || !ts->prop.max_y || !ts->max_touch_num) {
-		dev_err(&ts->client->dev, "Invalid config, using defaults\n");
+		dev_err(&ts->client->dev,
+			"Invalid config (%d, %d, %d), using defaults\n",
+			ts->prop.max_x, ts->prop.max_y, ts->max_touch_num);
 		ts->prop.max_x = GOODIX_MAX_WIDTH - 1;
 		ts->prop.max_y = GOODIX_MAX_HEIGHT - 1;
 		ts->max_touch_num = GOODIX_MAX_CONTACTS;