diff options
-rw-r--r-- | v4l/ChangeLog | 8 | ||||
-rw-r--r-- | v4l_experimental/pvrusb2/pvrusb2-i2c-core.c | 26 |
2 files changed, 33 insertions, 1 deletions
diff --git a/v4l/ChangeLog b/v4l/ChangeLog index c5c8d8406..42e2b2027 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,11 @@ +2006-01-03 05:46 mcisely + + * v4l_experimental/pvrusb2/pvrusb2-i2c-core.c: (pvr2_i2c_xfer): + - Implement some (normally disabled) debug code to assist with + chasing I2C adapter issues. + + Signed-off-by: Mike Isely <isely@pobox.com> + 2006-01-03 04:01 mkrufky * linux/drivers/media/dvb/dvb-usb/cxusb.c: (cxusb_probe): diff --git a/v4l_experimental/pvrusb2/pvrusb2-i2c-core.c b/v4l_experimental/pvrusb2/pvrusb2-i2c-core.c index 8375ca7af..8f562fab7 100644 --- a/v4l_experimental/pvrusb2/pvrusb2-i2c-core.c +++ b/v4l_experimental/pvrusb2/pvrusb2-i2c-core.c @@ -1,6 +1,6 @@ /* * - * $Id: pvrusb2-i2c-core.c,v 1.1 2006/01/01 08:26:03 mcisely Exp $ + * $Id: pvrusb2-i2c-core.c,v 1.2 2006/01/03 05:48:29 mcisely Exp $ * * Copyright (C) 2005 Mike Isely <isely@pobox.com> * @@ -254,6 +254,30 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, } done: + if (debug & PVR2_TRACE_I2C_TRAF) { + unsigned int idx; + for (idx = 0; idx < num; idx++) { + printk(KERN_INFO + "pvrusb2 i2c xfer %u/%u:" + " addr=0x%x len=%d %s%s", + idx+1,num, + msgs[idx].addr, + msgs[idx].len, + (msgs[idx].flags & I2C_M_RD ? + "read" : "write"), + (msgs[idx].flags & I2C_M_NOSTART ? + " nostart" : "")); + if (idx+1 == num) { + printk(" result=%d",ret); + } + printk("\n"); + } + if (!num) { + printk(KERN_INFO + "pvrusb2 i2c xfer null transfer result=%d\n", + ret); + } + } return ret; } |