public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Walls <awalls@md.metrocast.net>
To: Jarod Wilson <jarod@redhat.com>
Cc: Janne Grunau <j@jannau.net>,
	linux-media@vger.kernel.org, Jean Delvare <khali@linux-fr.org>
Subject: [PATCH] ir-kbd-i2c: Add debug to examine received data in get_key_haup_common()
Date: Fri, 14 Jan 2011 16:50:44 -0500	[thread overview]
Message-ID: <1295041844.2459.15.camel@localhost> (raw)

Add a hex dump of the received bytes for tester reporting of actual data
received from the hardware.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>

---
My heart won't be broken if this never makes it into the kernel.

Regards,
Andy

diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index c87b6bc..b27fc43 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -76,6 +76,11 @@ static int get_key_haup_common(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw,
 	if (size != i2c_master_recv(ir->c, buf, size))
 		return -EIO;
 
+	if (debug >= 2)
+		print_hex_dump_bytes(MODULE_NAME
+				     ": get_key_haup_common: received bytes: ",
+				     DUMP_PREFIX_NONE, buf, size);
+
 	/* split rc5 data block ... */
 	start  = (buf[offset] >> 7) &    1;
 	range  = (buf[offset] >> 6) &    1;



                 reply	other threads:[~2011-01-14 21:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1295041844.2459.15.camel@localhost \
    --to=awalls@md.metrocast.net \
    --cc=j@jannau.net \
    --cc=jarod@redhat.com \
    --cc=khali@linux-fr.org \
    --cc=linux-media@vger.kernel.org \
    /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