summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-03-25 16:48:19 -0600
committerMike Isely <isely@pobox.com>2006-03-25 16:48:19 -0600
commitd0b804387be596a0e4ea8177236a9d8126ac3f81 (patch)
treea9d73941db6c073a83d96197c930c1c4b29072bb /linux/drivers/media/video
parent8b44741ac5b22de76954864b0db14a8d4ed5db07 (diff)
downloadmediapointer-dvb-s2-d0b804387be596a0e4ea8177236a9d8126ac3f81.tar.gz
mediapointer-dvb-s2-d0b804387be596a0e4ea8177236a9d8126ac3f81.tar.bz2
Add more trace print for central I2C module commands in pvrusb2
From: Mike Isely <isely@pobox.com> This just adds some more trace print to make possible tracking of I2C commands being broadcast to support modules. Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
index a89f3574f..84903ccf5 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
@@ -322,15 +322,26 @@ static int pvr2_i2c_core_singleton(struct i2c_client *cp,
int pvr2_i2c_client_cmd(struct pvr2_i2c_client *cp,unsigned int cmd,void *arg)
{
+ int stat;
if (pvrusb2_debug & PVR2_TRACE_I2C_CMD) {
char buf[100];
unsigned int cnt;
cnt = pvr2_i2c_client_describe(cp,PVR2_I2C_DETAIL_DEBUG,
buf,sizeof(buf));
pvr2_trace(PVR2_TRACE_I2C_CMD,
- "i2c COMMAND to %.*s",cnt,buf);
+ "i2c COMMAND (code=%u 0x%x) to %.*s",
+ cmd,cmd,cnt,buf);
}
- return pvr2_i2c_core_singleton(cp->client,cmd,arg);
+ stat = pvr2_i2c_core_singleton(cp->client,cmd,arg);
+ if (pvrusb2_debug & PVR2_TRACE_I2C_CMD) {
+ char buf[100];
+ unsigned int cnt;
+ cnt = pvr2_i2c_client_describe(cp,PVR2_I2C_DETAIL_DEBUG,
+ buf,sizeof(buf));
+ pvr2_trace(PVR2_TRACE_I2C_CMD,
+ "i2c COMMAND to %.*s (ret=%d)",cnt,buf,stat);
+ }
+ return stat;
}
int pvr2_i2c_core_cmd(struct pvr2_hdw *hdw,unsigned int cmd,void *arg)