summaryrefslogtreecommitdiff
path: root/v4l2-apps
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-12-31 01:45:35 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-31 01:45:35 -0200
commitec36a3c6efe4d753c0d6a336aeba24765f9c6979 (patch)
tree0498d26cc6b904cf759e610425409e95c1ec0536 /v4l2-apps
parent03d6e87fd6d1fdb6e7a1b638409d2f6f98df061d (diff)
downloadmediapointer-dvb-s2-ec36a3c6efe4d753c0d6a336aeba24765f9c6979.tar.gz
mediapointer-dvb-s2-ec36a3c6efe4d753c0d6a336aeba24765f9c6979.tar.bz2
parse_em28xx.pl: Add a limited capability of parsing i2c commands
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l2-apps')
-rwxr-xr-xv4l2-apps/util/parse_em28xx.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/v4l2-apps/util/parse_em28xx.pl b/v4l2-apps/util/parse_em28xx.pl
index d1bbb0f0d..3f5cda6da 100755
--- a/v4l2-apps/util/parse_em28xx.pl
+++ b/v4l2-apps/util/parse_em28xx.pl
@@ -62,7 +62,7 @@
# This way, it is easier to understand what the em28xx driver is doing.
#
# Known limitations:
-# - Currently, the tool only parses em28xx, ac97 and em202 registers.
+# - Currently, the tool only parses em28xx, i2c, ac97 and em202 registers.
# - It is limited to read/write operations with 1 or 2 bytes of
# arguments;
# - Not all registers are documented;
@@ -275,4 +275,11 @@ while (<>) {
$reg, $3, $2;
next;
}
+
+ if (m/40 02 00 00 ([0-9a-f].) 00 ([0-9a-f].) 00\s+[\>]+\s+([0-9a-f ]+)/) {
+ printf "i2c_master_send(0x$1>>1, { $3 }, 0x$2);\n";
+ }
+ if (m/c0 02 00 00 ([0-9a-f].) 00 ([0-9a-f].) 00\s+[\>]+\s+([0-9a-f ]+)/) {
+ printf "i2c_master_recv(0x$1>>1, &buf, 0x$2); /* $3 */\n";
+ }
}