From patchwork Sat Jun 11 08:56:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoel Pinheiro X-Patchwork-Id: 871182 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 p5B8uLEm016953 for ; Sat, 11 Jun 2011 08:56:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752613Ab1FKI4Q (ORCPT ); Sat, 11 Jun 2011 04:56:16 -0400 Received: from blu0-omc2-s35.blu0.hotmail.com ([65.55.111.110]:4297 "EHLO blu0-omc2-s35.blu0.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752480Ab1FKI4P (ORCPT ); Sat, 11 Jun 2011 04:56:15 -0400 Received: from BLU0-SMTP64 ([65.55.111.72]) by blu0-omc2-s35.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 11 Jun 2011 01:56:14 -0700 X-Originating-IP: [189.78.58.105] X-Originating-Email: [pinusdtv@hotmail.com] Message-ID: Received: from localhost.localdomain ([189.78.58.105]) by BLU0-SMTP64.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sat, 11 Jun 2011 01:56:14 -0700 From: Manoel Pinheiro To: linux-media@vger.kernel.org Subject: [PATCH 1/5] [media] mb86a20s: add i2c_gate_ctrl Date: Sat, 11 Jun 2011 05:56:00 -0300 X-Mailer: git-send-email 1.7.3.4 X-OriginalArrivalTime: 11 Jun 2011 08:56:14.0403 (UTC) FILETIME=[6B26C930:01CC2815] MIME-Version: 1.0 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]); Sat, 11 Jun 2011 08:56:21 +0000 (UTC) The register 0xfe controls the i2c-bus from the mb86a20s to tuner. Signed-off-by: Manoel Pinheiro --- drivers/media/dvb/frontends/mb86a20s.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/media/dvb/frontends/mb86a20s.c b/drivers/media/dvb/frontends/mb86a20s.c index 0f867a5..f3c4013 100644 --- a/drivers/media/dvb/frontends/mb86a20s.c +++ b/drivers/media/dvb/frontends/mb86a20s.c @@ -370,6 +370,17 @@ static int mb86a20s_i2c_readreg(struct mb86a20s_state *state, mb86a20s_i2c_writeregdata(state, state->config->demod_address, \ regdata, ARRAY_SIZE(regdata)) +static int mb86a20s_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) +{ + struct mb86a20s_state *state = fe->demodulator_priv; + + /* Enable/Disable I2C bus for tuner control */ + if (enable) + return mb86a20s_writereg(state, 0xfe, 0); + else + return mb86a20s_writereg(state, 0xfe, 1); +} + static int mb86a20s_initfe(struct dvb_frontend *fe) { struct mb86a20s_state *state = fe->demodulator_priv; @@ -626,6 +637,7 @@ static struct dvb_frontend_ops mb86a20s_ops = { .release = mb86a20s_release, + .i2c_gate_ctrl = mb86a20s_i2c_gate_ctrl, .init = mb86a20s_initfe, .set_frontend = mb86a20s_set_frontend, .get_frontend = mb86a20s_get_frontend,