This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-utils.git tree:
Subject: parse_dib0700.pl: add support to identify delays Author: Mauro Carvalho Chehab <[email protected]> Date: Tue Jun 24 17:31:21 2014 -0300 This could be relevant for GPIO settings and similar stuff. Signed-off-by: Mauro Carvalho Chehab <[email protected]> contrib/dib0700/parse_dib0700.pl | 24 +++++++++++++++++------- 1 files changed, 17 insertions(+), 7 deletions(-) --- http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=e75d9692dc28c7fe1f7d2cf5e73c0cf3ace931ba diff --git a/contrib/dib0700/parse_dib0700.pl b/contrib/dib0700/parse_dib0700.pl index 9eac312..15acd31 100755 --- a/contrib/dib0700/parse_dib0700.pl +++ b/contrib/dib0700/parse_dib0700.pl @@ -82,16 +82,19 @@ sub type_req($) return $s; } +my $delay = 0; + while (<>) { tr/A-F/a-f/; - if (m/([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].)\s*[\<\>]+\s*(.*)/) { - my $reqtype = hex($1); - my $req = hex($2); - my $wvalue = hex("$4$3"); - my $windex = hex("$6$5"); - my $wlen = hex("$8$7"); - my $payload = $9; + if (m/(.*)([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].)\s*[\<\>]+\s*(.*)/) { + my $prev = $1; + my $reqtype = hex($2); + my $req = hex($3); + my $wvalue = hex("$5$4"); + my $windex = hex("$7$6"); + my $wlen = hex("$9$8"); + my $payload = $10; my @bytes = split(/ /, $payload); for (my $i = 0; $i < scalar(@bytes); $i++) { $bytes[$i] = hex($bytes[$i]); @@ -103,6 +106,13 @@ while (<>) { $req = sprintf "0x%02x", $req; } + printf "msleep(%d);\n", $delay if ($delay); + $delay = 0; + + if (m/(IN|OUT): (\d+) ms \d+ ms/) { + $delay = $2 if ($2 > 1); + } + if ($req eq "REQUEST_I2C_READ") { my $txlen = ($wvalue >> 8) + 2; my $addr = sprintf "0x%02x >> 1", $wvalue & 0xfe; _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
