From patchwork Sun Jul 24 18:44:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 7488 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Sun, 24 Jul 2011 18:45:07 +0000 Received: from casper.infradead.org [85.118.1.10] by localhost.localdomain with IMAP (fetchmail-6.3.17) for (single-drop); Sun, 24 Jul 2011 15:46:31 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Ql3fn-0000cS-0D; Sun, 24 Jul 2011 18:45:07 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751674Ab1GXSoo (ORCPT + 1 other); Sun, 24 Jul 2011 14:44:44 -0400 Received: from mail-ey0-f171.google.com ([209.85.215.171]:56475 "EHLO mail-ey0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751516Ab1GXSoo (ORCPT ); Sun, 24 Jul 2011 14:44:44 -0400 Received: by eye22 with SMTP id 22so3133708eye.2 for ; Sun, 24 Jul 2011 11:44:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.102.144 with SMTP id g16mr465853ebo.62.1311533083157; Sun, 24 Jul 2011 11:44:43 -0700 (PDT) Received: by 10.213.7.79 with HTTP; Sun, 24 Jul 2011 11:44:43 -0700 (PDT) Date: Sun, 24 Jul 2011 14:44:43 -0400 Message-ID: Subject: [PATCH] cx231xx: Fix power ramping issue From: Devin Heitmueller To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Gerd Hoffmann Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Attached is a patch which addresses the issue discussed by Mauro and Gerd for the "-32" errors seen with the Hauppauge USBLive 2. Devin cx231xx: Fix power ramp time to be consistent regardless of CONFIG_HZ From: Devin Heitmueller On platforms that have CONFIG_HZ set to 100, the power ramp time effectively ends up being 10ms. However, on those that have a higher CONFIG_HZ, the time ends up *actually* being 5ms, which doesn't allow enough time for the hardware to be fully powered up before attempting to address it via i2c. Change the constant to 10ms, which is long enough for the hardware to power up, and won't really be anymore time than it was previously on platforms with CONFIG_HZ being 100. Credit goes to Mauro Carvalho Chehab and Gerd Hoffmann who previously investigated this issue. Tested with the Hauppauge USBLive 2, with which the problem was readily reproducible after setting CONFIG_HZ to 1000. Signed-off-by: Devin Heitmueller Cc: Mauro Carvalho Chehab Cc: Gerd Hoffmann diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/video/cx231xx/cx231xx.h index b39b85e..472d169 100644 --- a/drivers/media/video/cx231xx/cx231xx.h +++ b/drivers/media/video/cx231xx/cx231xx.h @@ -43,7 +43,7 @@ #include "cx231xx-conf-reg.h" #define DRIVER_NAME "cx231xx" -#define PWR_SLEEP_INTERVAL 5 +#define PWR_SLEEP_INTERVAL 10 /* I2C addresses for control block in Cx231xx */ #define AFE_DEVICE_ADDRESS 0x60