lkml.org 
[lkml]   [2013]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 19/53] Input: atmel_mxt_ts - Improve bootloader progress output
    Date
    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>
    ---
    drivers/input/touchscreen/atmel_mxt_ts.c | 8 +++++++-
    1 file changed, 7 insertions(+), 1 deletion(-)

    diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
    index 2cd8ead..e8f410c 100644
    --- a/drivers/input/touchscreen/atmel_mxt_ts.c
    +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
    @@ -1465,6 +1465,7 @@ static int mxt_load_fw(struct device *dev, const char *fn)
    unsigned int frame_size;
    unsigned int pos = 0;
    unsigned int retry = 0;
    + unsigned int frame = 0;
    int ret;

    ret = request_firmware(&fw, fn, dev);
    @@ -1524,9 +1525,12 @@ static int mxt_load_fw(struct device *dev, const char *fn)
    } else {
    retry = 0;
    pos += frame_size;
    + frame++;
    }

    - dev_dbg(dev, "Updated %d bytes / %zd bytes\n", pos, fw->size);
    + if (frame % 50 == 0)
    + dev_info(dev, "Sent %d frames, %d/%zd bytes\n",
    + frame, pos, fw->size);
    }

    /* Wait for flash. */
    @@ -1535,6 +1539,8 @@ static int mxt_load_fw(struct device *dev, const char *fn)
    if (ret)
    goto disable_irq;

    + dev_info(dev, "Sent %d frames, %zd bytes\n", frame, pos);
    +
    /* Wait for device to reset. Some bootloader versions do not assert
    * the CHG line after bootloading has finished, so ignore error */
    mxt_wait_for_completion(data, &data->bl_completion,
    --
    1.7.10.4


    \
     
     \ /
      Last update: 2013-06-05 22:21    [W:4.037 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site