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: 1003222 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6OIikG5015997 for ; Sun, 24 Jul 2011 18:44:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751674Ab1GXSoo (ORCPT ); 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 24 Jul 2011 18:44:47 +0000 (UTC) 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