From: Michael Krufky <mkrufky@linuxtv.org>
To: linux-media@vger.kernel.org
Cc: mchehab@redhat.com, Michael Krufky <mkrufky@linuxtv.org>
Subject: [PATCH 1/2] tda10071: add tuner_i2c_addr to struct tda10071_config
Date: Sun, 16 Dec 2012 20:05:50 -0500 [thread overview]
Message-ID: <1355706351-25551-1-git-send-email-mkrufky@linuxtv.org> (raw)
The default i2c address for the tuner is 0x14,
allow this to be overridden with a configuration parameter
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Antti Palosaari <crope@iki.fi>
---
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
--
1.7.10.4
next reply other threads:[~2012-12-17 1:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 1:05 Michael Krufky [this message]
2012-12-17 1:05 ` [PATCH 2/2] cx23885: add basic DVB-S2 support for Hauppauge HVR-4400 Michael Krufky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355706351-25551-1-git-send-email-mkrufky@linuxtv.org \
--to=mkrufky@linuxtv.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).