From patchwork Tue Aug 5 05:46:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bimow Chen X-Patchwork-Id: 4676051 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 90DEB9F373 for ; Tue, 5 Aug 2014 05:45:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA1BE2013A for ; Tue, 5 Aug 2014 05:45:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4BED720136 for ; Tue, 5 Aug 2014 05:45:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755151AbaHEFp4 (ORCPT ); Tue, 5 Aug 2014 01:45:56 -0400 Received: from 219-87-157-213.static.tfn.net.tw ([219.87.157.213]:18715 "EHLO ironport.ite.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755141AbaHEFp4 (ORCPT ); Tue, 5 Aug 2014 01:45:56 -0400 Received: from unknown (HELO mse.ite.com.tw) ([192.168.35.30]) by ironport.ite.com.tw with ESMTP; 05 Aug 2014 13:45:54 +0800 Received: from ms2.internal.ite.com.tw (ms2.internal.ite.com.tw [192.168.15.236]) by mse.ite.com.tw with ESMTP id s755jrHY002618 for ; Tue, 5 Aug 2014 13:45:53 +0800 (CST) (envelope-from Bimow.Chen@ite.com.tw) Received: from [192.168.190.2] (unknown [192.168.190.2]) by ms2.internal.ite.com.tw (Postfix) with ESMTP id 1296645307 for ; Tue, 5 Aug 2014 13:45:50 +0800 (CST) Subject: [PATCH 3/4] V4L/DVB: Update tuner initialization sequence From: Bimow Chen To: linux-media@vger.kernel.org Organization: ITE Date: Tue, 05 Aug 2014 13:46:53 +0800 Message-ID: <1407217613.2988.7.camel@ite-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-MAIL: mse.ite.com.tw s755jrHY002618 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From 68df717c82f5da425a807a417872de0a9566211c Mon Sep 17 00:00:00 2001 From: Bimow Chen Date: Tue, 5 Aug 2014 11:14:47 +0800 Subject: [PATCH 3/4] Update tuner initialization sequence. Signed-off-by: Bimow Chen --- drivers/media/tuners/tuner_it913x.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/media/tuners/tuner_it913x.c b/drivers/media/tuners/tuner_it913x.c index 6f30d7e..728de57 100644 --- a/drivers/media/tuners/tuner_it913x.c +++ b/drivers/media/tuners/tuner_it913x.c @@ -200,10 +200,7 @@ static int it913x_init(struct dvb_frontend *fe) } } - /* Power Up Tuner - common all versions */ - ret = it913x_wr_reg(state, PRO_DMOD, 0xec40, 0x1); - ret |= it913x_wr_reg(state, PRO_DMOD, 0xfba8, 0x0); - ret |= it913x_wr_reg(state, PRO_DMOD, 0xec57, 0x0); + ret = it913x_wr_reg(state, PRO_DMOD, 0xec57, 0x0); ret |= it913x_wr_reg(state, PRO_DMOD, 0xec58, 0x0); return it913x_wr_reg(state, PRO_DMOD, 0xed81, val); @@ -396,6 +393,7 @@ struct dvb_frontend *it913x_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c_adap, u8 i2c_addr, u8 config) { struct it913x_state *state = NULL; + int ret; /* allocate memory for the internal state */ state = kzalloc(sizeof(struct it913x_state), GFP_KERNEL); @@ -429,6 +427,13 @@ struct dvb_frontend *it913x_attach(struct dvb_frontend *fe, memcpy(&fe->ops.tuner_ops, &it913x_tuner_ops, sizeof(struct dvb_tuner_ops)); + /* tuner RF initial */ + ret = it913x_wr_reg(state, PRO_DMOD, 0xec4c, 0x68); + if (ret < 0) + goto error; + + msleep(30); + dev_info(&i2c_adap->dev, "%s: ITE Tech IT913X successfully attached\n", KBUILD_MODNAME); -- 1.7.0.4