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: Add GPIO decoding logic
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Mon Nov 8 13:35:53 2010 -0200

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

 contrib/cx231xx/parse_cx231xx.pl |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

---

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

diff --git a/contrib/cx231xx/parse_cx231xx.pl b/contrib/cx231xx/parse_cx231xx.pl
index ad0ec7c..e6f7905 100755
--- a/contrib/cx231xx/parse_cx231xx.pl
+++ b/contrib/cx231xx/parse_cx231xx.pl
@@ -79,6 +79,31 @@ sub parse_i2c($$$$$$)
        printf("$payload\n");
 }
 
+sub parse_gpio($$$$$$)
+{
+       my $reqtype = shift;
+       my $req = shift;
+       my $wvalue = shift;
+       my $windex = shift;
+       my $wlen = shift;
+       my $payload = shift;
+
+       my $type = sprintf "Req %d: ", $req;
+       if ($req == 8) {
+               $type .= "GET gpio";
+       } elsif ($req == 9) {
+               $type .= "SET gpio";
+       } elsif ($req == 0xa) {
+               $type .= "SET gpie";
+       } elsif ($req == 0xb) {
+               $type .= "SET gpie";
+       }
+
+       my $gpio_bit = $wvalue << 16 & $windex;
+
+       printf("$type 0x%04x len %d val = %s\n", $gpio_bit, $wlen, $payload);
+}
+
 while (<>) {
        tr/A-F/a-f/;
        if (m/([4c]0) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].) ([0-9a-f].) 
([0-9a-f].) ([0-9a-f].) ([0-9a-f].)[\<\>\s]+(.*)/) {
@@ -94,5 +119,8 @@ while (<>) {
                } elsif ($req < 3) {
                        parse_i2c($reqtype, $req, $wvalue, $windex, $wlen, 
$payload);
                }
+#              if ($req >= 8 && $req <= 0xb) {
+                       parse_gpio($reqtype, $req, $wvalue, $windex, $wlen, 
$payload);
+#              }
        }
 }

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

Reply via email to