From patchwork Sat Aug 11 22:48:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CrazyCat X-Patchwork-Id: 1309211 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 9FD593FC33 for ; Sat, 11 Aug 2012 22:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752570Ab2HKWsS (ORCPT ); Sat, 11 Aug 2012 18:48:18 -0400 Received: from forward1.mail.yandex.net ([77.88.46.6]:37179 "EHLO forward1.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751998Ab2HKWsR (ORCPT ); Sat, 11 Aug 2012 18:48:17 -0400 Received: from web28d.yandex.ru (web28d.yandex.ru [77.88.47.168]) by forward1.mail.yandex.net (Yandex) with ESMTP id 9A6811242378; Sun, 12 Aug 2012 02:48:15 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1344725295; bh=h1kR7jiZ8kh06V2+go8G5YX9gr7NipKRcBsh4fCh/Mc=; h=From:To:Cc:In-Reply-To:References:Subject:MIME-Version:Message-Id: Date:Content-Transfer-Encoding:Content-Type; b=jx92kmGJSi25RkSlW6F5WkSZqlec6bWuABdLfYheBRWf6Yhpq2vv0GTd9Q5rSio8Y YUagtlTSGH4O7djTYCivJUd9kL2HjTKJ+WfCDRSCf2KyzLFphjCkPlpvyWcCRobkW9 kbChwpnAX+XRd8Nqf0whFxaPS4BnNvLdgs93cNKQ= Received: from 127.0.0.1 (localhost.localdomain [127.0.0.1]) by web28d.yandex.ru (Yandex) with ESMTP id 3F2901058064; Sun, 12 Aug 2012 02:48:15 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1344725295; bh=h1kR7jiZ8kh06V2+go8G5YX9gr7NipKRcBsh4fCh/Mc=; h=From:To:Cc:In-Reply-To:References:Subject:MIME-Version:Message-Id: Date:Content-Transfer-Encoding:Content-Type; b=jx92kmGJSi25RkSlW6F5WkSZqlec6bWuABdLfYheBRWf6Yhpq2vv0GTd9Q5rSio8Y YUagtlTSGH4O7djTYCivJUd9kL2HjTKJ+WfCDRSCf2KyzLFphjCkPlpvyWcCRobkW9 kbChwpnAX+XRd8Nqf0whFxaPS4BnNvLdgs93cNKQ= Received: from usa.globax.biz (usa.globax.biz [75.126.74.185]) by web28d.yandex.ru with HTTP; Sun, 12 Aug 2012 02:48:14 +0400 From: CrazyCat To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org In-Reply-To: <50258B49.8010504@redhat.com> References: <1128921342302008@web25h.yandex.ru> <50258B49.8010504@redhat.com> Subject: Re: [PATCH]Omicom S2 PCI support MIME-Version: 1.0 Message-Id: <1872301344725294@web28d.yandex.ru> Date: Sun, 12 Aug 2012 01:48:14 +0300 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Ok, fixed patch. Signed-off-by: Evgeny Plehov --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index b21bcce..7e6e43a 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c @@ -50,6 +50,8 @@ #include "stv6110x.h" #include "stv090x.h" #include "isl6423.h" +#include "lnbh24.h" + static int diseqc_method; module_param(diseqc_method, int, 0444); @@ -679,6 +681,62 @@ static void frontend_init(struct budget *budget) } } break; + + case 0x1020: { /* Omicom S2 */ + struct stv6110x_devctl *ctl; + saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); + msleep(50); + saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); + msleep(250); + + budget->dvb_frontend = dvb_attach(stv090x_attach, + &tt1600_stv090x_config, + &budget->i2c_adap, + STV090x_DEMODULATOR_0); + + if (budget->dvb_frontend) { + printk(KERN_INFO "budget: Omicom S2 detected\n"); + + ctl = dvb_attach(stv6110x_attach, + budget->dvb_frontend, + &tt1600_stv6110x_config, + &budget->i2c_adap); + + if (ctl) { + tt1600_stv090x_config.tuner_init = ctl->tuner_init; + tt1600_stv090x_config.tuner_sleep = ctl->tuner_sleep; + tt1600_stv090x_config.tuner_set_mode = ctl->tuner_set_mode; + tt1600_stv090x_config.tuner_set_frequency = ctl->tuner_set_frequency; + tt1600_stv090x_config.tuner_get_frequency = ctl->tuner_get_frequency; + tt1600_stv090x_config.tuner_set_bandwidth = ctl->tuner_set_bandwidth; + tt1600_stv090x_config.tuner_get_bandwidth = ctl->tuner_get_bandwidth; + tt1600_stv090x_config.tuner_set_bbgain = ctl->tuner_set_bbgain; + tt1600_stv090x_config.tuner_get_bbgain = ctl->tuner_get_bbgain; + tt1600_stv090x_config.tuner_set_refclk = ctl->tuner_set_refclk; + tt1600_stv090x_config.tuner_get_status = ctl->tuner_get_status; + + /* call the init function once to initialize + tuner's clock output divider and demod's + master clock */ + if (budget->dvb_frontend->ops.init) + budget->dvb_frontend->ops.init(budget->dvb_frontend); + + if (dvb_attach(lnbh24_attach, + budget->dvb_frontend, + &budget->i2c_adap, + LNBH24_PCL | LNBH24_TTX, + LNBH24_TEN, 0x14>>1) == NULL) { + printk(KERN_ERR + "No LNBH24 found!\n"); + goto error_out; + } + } else { + printk(KERN_ERR "%s: No STV6110(A) Silicon Tuner found!\n", __func__); + goto error_out; + } + } + } + break; } if (budget->dvb_frontend == NULL) { @@ -759,6 +817,7 @@ MAKE_BUDGET_INFO(fsacs0, "Fujitsu Siemens Activy Budget-S PCI (rev GR/grundig fr MAKE_BUDGET_INFO(fsacs1, "Fujitsu Siemens Activy Budget-S PCI (rev AL/alps frontend)", BUDGET_FS_ACTIVY); MAKE_BUDGET_INFO(fsact, "Fujitsu Siemens Activy Budget-T PCI (rev GR/Grundig frontend)", BUDGET_FS_ACTIVY); MAKE_BUDGET_INFO(fsact1, "Fujitsu Siemens Activy Budget-T PCI (rev AL/ALPS TDHD1-204A)", BUDGET_FS_ACTIVY); +MAKE_BUDGET_INFO(omicom, "Omicom S2 PCI", BUDGET_TT); static struct pci_device_id pci_tbl[] = { MAKE_EXTENSION_PCI(ttbs, 0x13c2, 0x1003), @@ -772,6 +831,7 @@ static struct pci_device_id pci_tbl[] = { MAKE_EXTENSION_PCI(fsacs0,0x1131, 0x4f61), MAKE_EXTENSION_PCI(fsact1, 0x1131, 0x5f60), MAKE_EXTENSION_PCI(fsact, 0x1131, 0x5f61), + MAKE_EXTENSION_PCI(omicom, 0x14c4, 0x1020), { .vendor = 0, }