From patchwork Tue Feb 1 22:40:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Igor M. Liplianin" X-Patchwork-Id: 524261 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p11MehVr013519 for ; Tue, 1 Feb 2011 22:40:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751294Ab1BAWkm (ORCPT ); Tue, 1 Feb 2011 17:40:42 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:38207 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751221Ab1BAWkl (ORCPT ); Tue, 1 Feb 2011 17:40:41 -0500 Received: by fxm20 with SMTP id 20so7348272fxm.19 for ; Tue, 01 Feb 2011 14:40:40 -0800 (PST) Received: by 10.223.86.199 with SMTP id t7mr921133fal.29.1296600040160; Tue, 01 Feb 2011 14:40:40 -0800 (PST) Received: from useri.localnet ([93.125.74.3]) by mx.google.com with ESMTPS id z1sm8107237fau.21.2011.02.01.14.40.38 (version=SSLv3 cipher=RC4-MD5); Tue, 01 Feb 2011 14:40:39 -0800 (PST) Subject: [PATCH 1/9 v2] ds3000: fill in demod init function To: mchehab@infradead.org, linux-media@vger.kernel.org From: "Igor M. Liplianin" Date: Wed, 2 Feb 2011 00:40:03 +0200 MIME-Version: 1.0 Message-Id: <201102020040.03555.liplianin@me.by> 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 (demeter1.kernel.org [140.211.167.41]); Tue, 01 Feb 2011 22:40:44 +0000 (UTC) diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index 125dfad..4773916 100644 --- a/drivers/media/dvb/frontends/ds3000.c +++ b/drivers/media/dvb/frontends/ds3000.c @@ -1092,10 +1092,6 @@ static int ds3000_tune(struct dvb_frontend *fe, /* Reset status register */ status = 0; /* Tune */ - /* TS2020 init */ - ds3000_tuner_writereg(state, 0x42, 0x73); - ds3000_tuner_writereg(state, 0x05, 0x01); - ds3000_tuner_writereg(state, 0x62, 0xf5); /* unknown */ ds3000_tuner_writereg(state, 0x07, 0x02); ds3000_tuner_writereg(state, 0x10, 0x00); @@ -1345,7 +1341,19 @@ static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe) */ static int ds3000_initfe(struct dvb_frontend *fe) { + struct ds3000_state *state = fe->demodulator_priv; + int ret; + dprintk("%s()\n", __func__); + /* hard reset */ + ds3000_writereg(state, 0x08, 0x01 | ds3000_readreg(state, 0x08)); + msleep(1); + + /* TS2020 init */ + ds3000_tuner_writereg(state, 0x42, 0x73); + ds3000_tuner_writereg(state, 0x05, 0x01); + ds3000_tuner_writereg(state, 0x62, 0xf5); + return 0; }