aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-17 12:09:48 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-17 12:09:48 -0200
commitd84895c72f3b008540e26dba2848a36361d4c892 (patch)
treea64395e55fddebb8b2d789c03133958cd1e8459a
parent28aac1389f1803e4060af3a68a17b6ba35ade1b2 (diff)
parse_af9035.pl: some cleanups
Do some cleanups at generic I2C handler. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rwxr-xr-xcontrib/af9035/parse_af9035.pl12
1 files changed, 3 insertions, 9 deletions
diff --git a/contrib/af9035/parse_af9035.pl b/contrib/af9035/parse_af9035.pl
index 9e2e9753..db69e535 100755
--- a/contrib/af9035/parse_af9035.pl
+++ b/contrib/af9035/parse_af9035.pl
@@ -192,12 +192,9 @@ sub print_send_recv($$$$$$)
}
}
+ return if ($hide_wr);
if ($ctrl_cmd eq "CMD_MEM_WR") {
- return if ($hide_wr);
-
- my $comment;
-
- $comment = "\t/* $payload */" if ($payload =~ /ERROR/);
+ my $comment = "\t/* $payload */" if ($payload =~ /ERROR/);
if (scalar(@ctrl_bytes) > 1) {
printf "ret = af9035_wr_regs(d, 0x%04x, $ctrl_len, { $ctrl_pay });$comment\n", $reg;
@@ -205,10 +202,7 @@ sub print_send_recv($$$$$$)
printf "ret = af9035_wr_reg(d, 0x%04x, $ctrl_pay);$comment\n", $reg;
}
return;
- }
- if ($ctrl_cmd eq "CMD_MEM_RD") {
- return if ($hide_rd);
-
+ } else {
my $comment = "\t/* read: $payload */";
if (scalar(@ctrl_bytes) > 0) {
printf "ret = af9035_rd_regs(d, 0x%04x, $ctrl_len, { $ctrl_pay }, $len, rbuf);$comment\n", $reg;

Privacy Policy