diff options
author | Nick Dyer <nick.dyer@itdev.co.uk> | 2014-05-19 02:14:45 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-05-19 02:27:29 -0400 |
commit | f477c7588bb167191f4162a380680204807316b7 (patch) | |
tree | ff0629372e81f7d815edc750415f2e5a49aae576 | |
parent | f943c74ad8b0dcf6371b29ff0925f0e649b7826f (diff) |
Input: atmel_mxt_ts - improve bootloader progress output
By implementing a frame counter, print out fewer debug messages (the
firmware may contain hundreds of frames).
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 5fb5b2231b5f..9bf32c3b53aa 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c | |||
@@ -1192,6 +1192,7 @@ static int mxt_load_fw(struct device *dev, const char *fn) | |||
1192 | unsigned int frame_size; | 1192 | unsigned int frame_size; |
1193 | unsigned int pos = 0; | 1193 | unsigned int pos = 0; |
1194 | unsigned int retry = 0; | 1194 | unsigned int retry = 0; |
1195 | unsigned int frame = 0; | ||
1195 | int ret; | 1196 | int ret; |
1196 | 1197 | ||
1197 | ret = request_firmware(&fw, fn, dev); | 1198 | ret = request_firmware(&fw, fn, dev); |
@@ -1251,9 +1252,12 @@ static int mxt_load_fw(struct device *dev, const char *fn) | |||
1251 | } else { | 1252 | } else { |
1252 | retry = 0; | 1253 | retry = 0; |
1253 | pos += frame_size; | 1254 | pos += frame_size; |
1255 | frame++; | ||
1254 | } | 1256 | } |
1255 | 1257 | ||
1256 | dev_dbg(dev, "Updated %d bytes / %zd bytes\n", pos, fw->size); | 1258 | if (frame % 50 == 0) |
1259 | dev_dbg(dev, "Sent %d frames, %d/%zd bytes\n", | ||
1260 | frame, pos, fw->size); | ||
1257 | } | 1261 | } |
1258 | 1262 | ||
1259 | /* Wait for flash. */ | 1263 | /* Wait for flash. */ |
@@ -1262,6 +1266,8 @@ static int mxt_load_fw(struct device *dev, const char *fn) | |||
1262 | if (ret) | 1266 | if (ret) |
1263 | goto disable_irq; | 1267 | goto disable_irq; |
1264 | 1268 | ||
1269 | dev_dbg(dev, "Sent %d frames, %d bytes\n", frame, pos); | ||
1270 | |||
1265 | /* | 1271 | /* |
1266 | * Wait for device to reset. Some bootloader versions do not assert | 1272 | * Wait for device to reset. Some bootloader versions do not assert |
1267 | * the CHG line after bootloading has finished, so ignore potential | 1273 | * the CHG line after bootloading has finished, so ignore potential |