Commit f477c758 authored by Nick Dyer's avatar Nick Dyer Committed by Dmitry Torokhov

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: default avatarNick Dyer <nick.dyer@itdev.co.uk>
Acked-by: default avatarBenson Leung <bleung@chromium.org>
Acked-by: default avatarYufeng Shen <miletus@chromium.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent f943c74a
...@@ -1192,6 +1192,7 @@ static int mxt_load_fw(struct device *dev, const char *fn) ...@@ -1192,6 +1192,7 @@ static int mxt_load_fw(struct device *dev, const char *fn)
unsigned int frame_size; unsigned int frame_size;
unsigned int pos = 0; unsigned int pos = 0;
unsigned int retry = 0; unsigned int retry = 0;
unsigned int frame = 0;
int ret; int ret;
ret = request_firmware(&fw, fn, dev); ret = request_firmware(&fw, fn, dev);
...@@ -1251,9 +1252,12 @@ static int mxt_load_fw(struct device *dev, const char *fn) ...@@ -1251,9 +1252,12 @@ static int mxt_load_fw(struct device *dev, const char *fn)
} else { } else {
retry = 0; retry = 0;
pos += frame_size; pos += frame_size;
frame++;
} }
dev_dbg(dev, "Updated %d bytes / %zd bytes\n", pos, fw->size); if (frame % 50 == 0)
dev_dbg(dev, "Sent %d frames, %d/%zd bytes\n",
frame, pos, fw->size);
} }
/* Wait for flash. */ /* Wait for flash. */
...@@ -1262,6 +1266,8 @@ static int mxt_load_fw(struct device *dev, const char *fn) ...@@ -1262,6 +1266,8 @@ static int mxt_load_fw(struct device *dev, const char *fn)
if (ret) if (ret)
goto disable_irq; goto disable_irq;
dev_dbg(dev, "Sent %d frames, %d bytes\n", frame, pos);
/* /*
* Wait for device to reset. Some bootloader versions do not assert * Wait for device to reset. Some bootloader versions do not assert
* the CHG line after bootloading has finished, so ignore potential * the CHG line after bootloading has finished, so ignore potential
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment