linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Scheller <d.scheller.oss@gmail.com>
To: linux-media@vger.kernel.org, mchehab@kernel.org,
	mchehab@s-opensource.com
Cc: rjkm@metzlerbros.de, jasmin@anw.at
Subject: [PATCH 7/9] [media] ddbridge: return stv09xx id in port_has_stv0900_aa()
Date: Sat, 24 Jun 2017 18:02:59 +0200	[thread overview]
Message-ID: <20170624160301.17710-8-d.scheller.oss@gmail.com> (raw)
In-Reply-To: <20170624160301.17710-1-d.scheller.oss@gmail.com>

From: Daniel Scheller <d.scheller@gmx.net>

The returned value is required for further evaluation of the exact
demodulator chip (stv090x or stv0910).

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
 drivers/media/pci/ddbridge/ddbridge-core.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
index 9420479bee9a..8c8cea9602de 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -1452,10 +1452,9 @@ static int port_has_stv0900(struct ddb_port *port)
 	return 1;
 }
 
-static int port_has_stv0900_aa(struct ddb_port *port)
+static int port_has_stv0900_aa(struct ddb_port *port, u8 *id)
 {
-	u8 val;
-	if (i2c_read_reg16(&port->i2c->adap, 0x68, 0xf100, &val) < 0)
+	if (i2c_read_reg16(&port->i2c->adap, 0x68, 0xf100, id) < 0)
 		return 0;
 	return 1;
 }
@@ -1502,7 +1501,7 @@ static void ddb_port_probe(struct ddb_port *port)
 {
 	struct ddb *dev = port->dev;
 	char *modname = "NO MODULE";
-	u8 xo2_type, xo2_id, cxd_id;
+	u8 xo2_type, xo2_id, cxd_id, stv_id;
 
 	port->class = DDB_PORT_NONE;
 
@@ -1594,7 +1593,7 @@ static void ddb_port_probe(struct ddb_port *port)
 		port->class = DDB_PORT_TUNER;
 		port->type = DDB_TUNER_DVBS_ST;
 		ddbwritel(I2C_SPEED_100, port->i2c->regs + I2C_TIMING);
-	} else if (port_has_stv0900_aa(port)) {
+	} else if (port_has_stv0900_aa(port, &stv_id)) {
 		modname = "DUAL DVB-S2";
 		port->class = DDB_PORT_TUNER;
 		port->type = DDB_TUNER_DVBS_ST_AA;
-- 
2.13.0

  parent reply	other threads:[~2017-06-24 16:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-24 16:02 [PATCH 0/9] STV0910/STV6111 drivers, ddbridge CineS2 V7 support Daniel Scheller
2017-06-24 16:02 ` [PATCH 1/9] [media] dvb-frontends: add ST STV0910 DVB-S/S2 demodulator frontend driver Daniel Scheller
2017-06-24 16:02 ` [PATCH 2/9] [media] dvb-frontends/stv0910: Fix possible buffer overflow Daniel Scheller
2017-06-24 16:02 ` [PATCH 3/9] [media] dvb-frontends/stv0910: add multistream (ISI) and PLS capabilities Daniel Scheller
2017-06-24 16:02 ` [PATCH 4/9] [media] dvb-frontends/stv0910: Fix signal strength reporting Daniel Scheller
2017-06-26  8:55   ` Ralph Metzler
2017-06-26 10:00     ` Mauro Carvalho Chehab
2017-06-26 10:14       ` Ralph Metzler
2017-06-26 15:39     ` Daniel Scheller
2017-06-24 16:02 ` [PATCH 5/9] [media] dvb-frontends/stv0910: Add missing set_frontend fe-op Daniel Scheller
2017-06-24 16:02 ` [PATCH 6/9] [media] dvb-frontends: add ST STV6111 DVB-S/S2 tuner frontend driver Daniel Scheller
2017-06-24 16:02 ` Daniel Scheller [this message]
2017-06-24 16:03 ` [PATCH 8/9] [media] ddbridge: support for CineS2 V7(A) and DuoFlex S2 V4 hardware Daniel Scheller
2017-06-24 16:03 ` [PATCH 9/9] [media] ddbridge: stv0910 single demod mode module option Daniel Scheller

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=20170624160301.17710-8-d.scheller.oss@gmail.com \
    --to=d.scheller.oss@gmail.com \
    --cc=jasmin@anw.at \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=rjkm@metzlerbros.de \
    /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).