From patchwork Thu Jun 27 12:48:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Dyer X-Patchwork-Id: 2793291 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9E39E9F3A0 for ; Thu, 27 Jun 2013 13:03:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7A76920370 for ; Thu, 27 Jun 2013 13:03:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4647F2036C for ; Thu, 27 Jun 2013 13:03:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753887Ab3F0NDa (ORCPT ); Thu, 27 Jun 2013 09:03:30 -0400 Received: from kdh-gw.itdev.co.uk ([89.21.227.133]:36964 "EHLO hermes.kdh.itdev.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753370Ab3F0Muk (ORCPT ); Thu, 27 Jun 2013 08:50:40 -0400 Received: from localhost.localdomain (andromeda.kdh.itdev.co.uk [192.168.1.19]) by hermes.kdh.itdev.co.uk (Postfix) with ESMTP id 5C9F685AFF; Thu, 27 Jun 2013 13:50:39 +0100 (BST) From: Nick Dyer To: Dmitry Torokhov Cc: Daniel Kurtz , Henrik Rydberg , Joonyoung Shim , Alan Bowens , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Meerwald , Benson Leung , Olof Johansson , Nick Dyer Subject: [PATCH 17/51] Input: atmel_mxt_ts - Improve bootloader progress output Date: Thu, 27 Jun 2013 13:48:52 +0100 Message-Id: <1372337366-9286-18-git-send-email-nick.dyer@itdev.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1372337366-9286-1-git-send-email-nick.dyer@itdev.co.uk> References: <1372337366-9286-1-git-send-email-nick.dyer@itdev.co.uk> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP By implementing a frame counter, print out fewer debug messages (the firmware may contain hundreds of frames). Signed-off-by: Nick Dyer Acked-by: Benson Leung --- 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 3172610..99ebdec 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -1456,6 +1456,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); @@ -1515,9 +1516,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. */ @@ -1526,6 +1530,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,