From patchwork Mon Dec 17 01:05:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ira Krufky X-Patchwork-Id: 15920 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1TkP9z-0008UR-Hf for patchwork@linuxtv.org; Mon, 17 Dec 2012 02:06:23 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp for id 1TkP9y-0004fU-Ii; Mon, 17 Dec 2012 02:06:23 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751969Ab2LQBGU (ORCPT ); Sun, 16 Dec 2012 20:06:20 -0500 Received: from mail.hauppauge.com ([167.206.143.4]:3235 "EHLO mail.hauppauge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751397Ab2LQBGU (ORCPT ); Sun, 16 Dec 2012 20:06:20 -0500 Received: from 24.193.167.210 [24.193.167.210] by mail.hauppauge.com with XWall v3.41e ; Sun, 16 Dec 2012 20:04:39 -0500 From: Michael Krufky To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, Michael Krufky Subject: [PATCH 1/2] tda10071: add tuner_i2c_addr to struct tda10071_config Date: Sun, 16 Dec 2012 20:05:50 -0500 Message-Id: <1355706351-25551-1-git-send-email-mkrufky@linuxtv.org> X-Mailer: git-send-email 1.7.10.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.12.17.5420 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1600_1699 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' The default i2c address for the tuner is 0x14, allow this to be overridden with a configuration parameter Signed-off-by: Michael Krufky Reviewed-by: Antti Palosaari --- drivers/media/dvb-frontends/tda10071.c | 2 +- drivers/media/dvb-frontends/tda10071.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c index 16a4bc5..7103629 100644 --- a/drivers/media/dvb-frontends/tda10071.c +++ b/drivers/media/dvb-frontends/tda10071.c @@ -1064,7 +1064,7 @@ static int tda10071_init(struct dvb_frontend *fe) cmd.args[2] = 0x00; cmd.args[3] = 0x00; cmd.args[4] = 0x00; - cmd.args[5] = 0x14; + cmd.args[5] = (priv->cfg.tuner_i2c_addr) ? priv->cfg.tuner_i2c_addr : 0x14; cmd.args[6] = 0x00; cmd.args[7] = 0x03; cmd.args[8] = 0x02; diff --git a/drivers/media/dvb-frontends/tda10071.h b/drivers/media/dvb-frontends/tda10071.h index 21163c4..a20d5c4 100644 --- a/drivers/media/dvb-frontends/tda10071.h +++ b/drivers/media/dvb-frontends/tda10071.h @@ -30,6 +30,12 @@ struct tda10071_config { */ u8 i2c_address; + /* Tuner I2C address. + * Default: 0x14 + * Values: 0x14, 0x54, ... + */ + u8 tuner_i2c_addr; + /* Max bytes I2C provider can write at once. * Note: Buffer is taken from the stack currently! * Default: none, must set