From patchwork Mon Feb 15 17:37:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 79441 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1FHcSJg013116 for ; Mon, 15 Feb 2010 17:38:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755891Ab0BORiV (ORCPT ); Mon, 15 Feb 2010 12:38:21 -0500 Received: from mail-in-04.arcor-online.net ([151.189.21.44]:60178 "EHLO mail-in-04.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755787Ab0BORiS (ORCPT ); Mon, 15 Feb 2010 12:38:18 -0500 Received: from mail-in-03-z2.arcor-online.net (mail-in-03-z2.arcor-online.net [151.189.8.15]) by mx.arcor.de (Postfix) with ESMTP id B9D1A33ABA0; Mon, 15 Feb 2010 18:38:16 +0100 (CET) Received: from mail-in-14.arcor-online.net (mail-in-14.arcor-online.net [151.189.21.54]) by mail-in-03-z2.arcor-online.net (Postfix) with ESMTP id AC9052D2BFF; Mon, 15 Feb 2010 18:38:16 +0100 (CET) Received: from localhost.localdomain (dslb-188-103-172-103.pools.arcor-ip.net [188.103.172.103]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-14.arcor-online.net (Postfix) with ESMTPA id 575AC28B0C2; Mon, 15 Feb 2010 18:38:16 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-14.arcor-online.net 575AC28B0C2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1266255496; bh=yJ+AWDdWtw4CT7Lr2rvxvPE0ilw0uPhUcGARbhd2UVg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=uWoXsnUDT9ezyTz9w/HHovZenhFoKoPKNLTVpnmnaBfX0iApIuxEIs8wJJXVhpSZ0 e/0hr9bdzBczzvEnYEIR8aWULWCVUaxGhvykTORczhdDf4VTAVTFy3dzsW/xMAIZdx AGqa62Cbnm3T1PwQf4rGhkimaeuP7WFUFxNos6zg= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, dheitmueller@kernellabs.com, Stefan Ringel Subject: [PATCH 04/11] tm6000: add different tuner reset for terratec Date: Mon, 15 Feb 2010 18:37:17 +0100 Message-Id: <1266255444-7422-4-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1266255444-7422-3-git-send-email-stefan.ringel@arcor.de> References: <1266255444-7422-1-git-send-email-stefan.ringel@arcor.de> <1266255444-7422-2-git-send-email-stefan.ringel@arcor.de> <1266255444-7422-3-git-send-email-stefan.ringel@arcor.de> 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.3 (demeter.kernel.org [140.211.167.41]); Mon, 15 Feb 2010 17:38:28 +0000 (UTC) diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index ff04bba..5a8d716 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -269,12 +269,28 @@ int tm6000_tuner_callback(void *ptr, int component, int command, int arg) /* Reset codes during load firmware */ switch (arg) { case 0: - tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, - dev->tuner_reset_gpio, 0x00); - msleep(130); - tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, - dev->tuner_reset_gpio, 0x01); - msleep(130); + /* newer tuner can faster reset */ + switch(dev->model) { + case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE: + tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, + dev->tuner_reset_gpio, 0x01); + msleep(60); + tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, + dev->tuner_reset_gpio, 0x00); + msleep(75); + tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, + dev->tuner_reset_gpio, 0x01); + msleep(60); + break; + default: + tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, + dev->tuner_reset_gpio, 0x00); + msleep(130); + tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, + dev->tuner_reset_gpio, 0x01); + msleep(130); + break; + } break; case 1: tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT,