From patchwork Tue Aug 7 02:47:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 1282591 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 844983FC8A for ; Tue, 7 Aug 2012 02:48:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932574Ab2HGCsE (ORCPT ); Mon, 6 Aug 2012 22:48:04 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:32810 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932566Ab2HGCsD (ORCPT ); Mon, 6 Aug 2012 22:48:03 -0400 Received: by mail-vc0-f174.google.com with SMTP id fk26so3432645vcb.19 for ; Mon, 06 Aug 2012 19:48:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=y3wkcEwzK/vkxkfYuCi/AKOtnxib05or4X+zp7E73g4=; b=WEPEyfzxcgMYBXaEglD6gqy/fAFD+JCd4Kf1lPzq9FY03E8r872R6QOWjxe1AnuxJm aGTsCDGBsB2YR/h4SGM7Kv7+udGVCsWQO8W8/8wxy7Ot9fZLc6KEgok+1QZRDScDlmr2 Ok/vu1EXR0xg29WlNDyxCuABmkUq1IaiVUO7sLebV8Di5MryAt2pSfVCWwKKsGZmIoOV R0tq46j3WQcWPxtjNKbDZxR4rUdRa+lb1q3VH0IFVOrdnYWCeMoFdU7DzdhFAR0MEvvV WS14ZLc+SQNGq/Zy+rEstuS0dvjNkAwUunF0pNTBcanbLDAnjsfIoqqtxSeCMrlLSgKp m+3w== Received: by 10.220.214.208 with SMTP id hb16mr9657763vcb.56.1344307682791; Mon, 06 Aug 2012 19:48:02 -0700 (PDT) Received: from localhost.localdomain (pool-108-54-72-165.nycmny.fios.verizon.net. [108.54.72.165]) by mx.google.com with ESMTPS id e9sm17555638vdf.21.2012.08.06.19.48.01 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 19:48:02 -0700 (PDT) From: Devin Heitmueller To: linux-media@vger.kernel.org Cc: Devin Heitmueller Subject: [PATCH 16/24] au0828: tune retry interval for i2c interaction Date: Mon, 6 Aug 2012 22:47:06 -0400 Message-Id: <1344307634-11673-17-git-send-email-dheitmueller@kernellabs.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1344307634-11673-1-git-send-email-dheitmueller@kernellabs.com> References: <1344307634-11673-1-git-send-email-dheitmueller@kernellabs.com> X-Gm-Message-State: ALoCoQkWldAo9+zEobPKqrFhewXbvgjtGHSfVFuVy/Gm6MpH5lUl8P1Izcw2cGUd1uT51Hi0u+av Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Adjust the retry timeout and number of retries to speed up xc5000 firmware download. With this change it goes from 4.2 seconds to 2.9. The net time waited is pretty much the same, but we just poll more often. Tested at 250 KHz as well as 30 KHz. Signed-off-by: Devin Heitmueller --- drivers/media/video/au0828/au0828-i2c.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/au0828/au0828-i2c.c b/drivers/media/video/au0828/au0828-i2c.c index d454555..3bc76df 100644 --- a/drivers/media/video/au0828/au0828-i2c.c +++ b/drivers/media/video/au0828/au0828-i2c.c @@ -33,8 +33,8 @@ static int i2c_scan; module_param(i2c_scan, int, 0444); MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); -#define I2C_WAIT_DELAY 512 -#define I2C_WAIT_RETRY 64 +#define I2C_WAIT_DELAY 25 +#define I2C_WAIT_RETRY 1000 static inline int i2c_slave_did_write_ack(struct i2c_adapter *i2c_adap) {