From: Peter Griffin <peter.griffin@linaro.org>
To: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, srinivas.kandagatla@gmail.com,
maxime.coquelin@st.com, patrice.chotard@st.com,
mchehab@osg.samsung.com, m.krufky@samsung.com
Cc: peter.griffin@linaro.org, lee.jones@linaro.org,
hugues.fruchet@st.com, linux-media@vger.kernel.org,
devicetree@vger.kernel.org, joe@perches.com
Subject: [PATCH v2 01/11] [media] stv0367: Refine i2c error trace to include i2c address
Date: Thu, 30 Jul 2015 18:08:51 +0100 [thread overview]
Message-ID: <1438276141-16902-2-git-send-email-peter.griffin@linaro.org> (raw)
In-Reply-To: <1438276141-16902-1-git-send-email-peter.griffin@linaro.org>
When using stv0367 demodulator with STi STB platforms,
we can have easily have four or more stv0367 demods running
in the system at one time.
As typically the b2120 reference design ships with a b2004a daughter
board, which can accept two dvb NIM cards, and each b2100A NIM
has 2x stv0367 demods and 2x NXPs tuner on it.
In such circumstances it is useful to print the i2c address
on error messages to know which one is failing due to I2C issues.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
drivers/media/dvb-frontends/stv0367.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c
index ec3e18e..9a49db1 100644
--- a/drivers/media/dvb-frontends/stv0367.c
+++ b/drivers/media/dvb-frontends/stv0367.c
@@ -791,11 +791,13 @@ int stv0367_writeregs(struct stv0367_state *state, u16 reg, u8 *data, int len)
memcpy(buf + 2, data, len);
if (i2cdebug)
- printk(KERN_DEBUG "%s: %02x: %02x\n", __func__, reg, buf[2]);
+ printk(KERN_DEBUG "%s: [%02x] %02x: %02x\n", __func__,
+ state->config->demod_address, reg, buf[2]);
ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1)
- printk(KERN_ERR "%s: i2c write error!\n", __func__);
+ printk(KERN_ERR "%s: i2c write error! ([%02x] %02x: %02x)\n",
+ __func__, state->config->demod_address, reg, buf[2]);
return (ret != 1) ? -EREMOTEIO : 0;
}
@@ -829,10 +831,12 @@ static u8 stv0367_readreg(struct stv0367_state *state, u16 reg)
ret = i2c_transfer(state->i2c, msg, 2);
if (ret != 2)
- printk(KERN_ERR "%s: i2c read error\n", __func__);
+ printk(KERN_ERR "%s: i2c read error ([%02x] %02x: %02x)\n",
+ __func__, state->config->demod_address, reg, b1[0]);
if (i2cdebug)
- printk(KERN_DEBUG "%s: %02x: %02x\n", __func__, reg, b1[0]);
+ printk(KERN_DEBUG "%s: [%02x] %02x: %02x\n", __func__,
+ state->config->demod_address, reg, b1[0]);
return b1[0];
}
--
1.9.1
next prev parent reply other threads:[~2015-07-30 17:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 17:08 [PATCH v2 00/11] Add c8sectpfe LinuxDVB demux driver Peter Griffin
2015-07-30 17:08 ` Peter Griffin [this message]
2015-07-30 17:08 ` [PATCH v2 02/11] [media] stv0367: Add support for 16Mhz reference clock Peter Griffin
2015-07-30 17:08 ` [PATCH v2 03/11] dvb-pll: Convert struct dvb_pll_desc uses to const Peter Griffin
2015-07-30 17:08 ` [PATCH v2 04/11] [media] c8sectpfe: Add DT bindings documentation for c8sectpfe driver Peter Griffin
2015-07-30 17:08 ` [PATCH v2 05/11] ARM: DT: STi: STiH407: Add c8sectpfe LinuxDVB DT node Peter Griffin
2015-08-17 14:52 ` Mauro Carvalho Chehab
2015-08-25 16:49 ` Peter Griffin
2015-07-30 17:08 ` [PATCH v2 06/11] [media] c8sectpfe: STiH407/10 Linux DVB demux support Peter Griffin
2015-07-30 17:08 ` [PATCH v2 07/11] [media] c8sectpfe: Add LDVB helper functions Peter Griffin
2015-07-30 17:08 ` [PATCH v2 08/11] [media] c8sectpfe: Add support for various ST NIM cards Peter Griffin
2015-07-30 17:08 ` [PATCH v2 09/11] [media] c8sectpfe: Add c8sectpfe debugfs support Peter Griffin
2015-07-30 17:09 ` [PATCH v2 10/11] [media] c8sectpfe: Add Kconfig and Makefile for the driver Peter Griffin
2015-07-30 17:09 ` [PATCH v2 11/11] MAINTAINERS: Add c8sectpfe driver directory to STi section Peter Griffin
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=1438276141-16902-2-git-send-email-peter.griffin@linaro.org \
--to=peter.griffin@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=hugues.fruchet@st.com \
--cc=joe@perches.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.krufky@samsung.com \
--cc=maxime.coquelin@st.com \
--cc=mchehab@osg.samsung.com \
--cc=patrice.chotard@st.com \
--cc=srinivas.kandagatla@gmail.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).