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: Discard fields outside I2C size
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Tue Dec 7 12:38:46 2010 -0200

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 contrib/sn9c201/parse_sn9c201.pl |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=abb9ed8173fddff2b5923d6b8ff034ddb48a2ea6

diff --git a/contrib/sn9c201/parse_sn9c201.pl b/contrib/sn9c201/parse_sn9c201.pl
index b402433..1ddcee2 100755
--- a/contrib/sn9c201/parse_sn9c201.pl
+++ b/contrib/sn9c201/parse_sn9c201.pl
@@ -117,18 +117,39 @@ while (<>) {
                                $reg++;
                        }
 
-#                      my $data = $payload;
-#                      $payload =~ 
+                       my $data;
+                       for (my $i = 0; $i < $i2c{"size"}; $i++) {
+                               my $tmp = $payload;
+                               $tmp =~ s/\s+.*//;
+                               $payload =~ s/^([0-9a-f].)//;
+                                $payload =~ s/^\s+//;
+                               $data .= "$tmp ";
+                       }
+                       $data =~ s/\s+$//;
+
+                       my $discard;
+                       for (my $i = 0; $i < 5; $i++) {
+                               my $tmp = $payload;
+                               $tmp =~ s/\s+.*//;
+                               $payload =~ s/^([0-9a-f].)//;
+                                $payload =~ s/^\s+//;
+                               $discard .= "$tmp ";
+                       }
+                       $discard =~ s/\s+$//;
 
                        my $s = sprintf "%s %s %s %s %s size=%d",
                                $i2c{"op"}, $i2c{"speed"}, $i2c{"busy"}, 
$i2c{"err"}, $i2c{"i2c"}, $i2c{"size"};
                        $s =~ s/\s+/ /g;
 
                        if ($reqtype & 0x80) {
-                               printf "Read I2C: $s $i2c_id$payload\n";
+                               printf "Read I2C: $s $i2c_id$data";
                        } else {
-                               printf "I2C $s $i2c_id$payload\n";
+                               printf "I2C $s $i2c_id$data";
                        }
+                       printf " ($discard)" if ($discard);
+                       printf "Extra: $payload" if ($payload);
+                       print "\n";
+
                        printf("\t%s, Req %3d, wValue: 0x%04x, wIndex 0x%04x, 
wlen %d: %s\n",
                                type_req($reqtype), $req, $wvalue, $windex, 
$wlen, $fullpayload);
                } else {

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to