projects
/
linux-gpio-pinout
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
133e545
)
all devices don't have hex prefix, e.g. lirc module
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 10 Nov 2017 18:45:32 +0000
(19:45 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 11 Nov 2017 10:40:54 +0000
(11:40 +0100)
gpio.pl
patch
|
blob
|
history
diff --git
a/gpio.pl
b/gpio.pl
index
a681156
..
429982b
100755
(executable)
--- a/
gpio.pl
+++ b/
gpio.pl
@@
-83,8
+83,9
@@
my $device;
open(my $fh, '<', $opt_read . '/sys/kernel/debug/pinctrl/pinctrl-handles');
while(<$fh>) {
chomp;
- if ( m/device:
[0-9a-f]+\.(\w
+)/ ) {
+ if ( m/device:
(\S
+)/ ) {
$device = $1;
+ $device =~ s/^[0-9a-f]*\.//; # remove hex address
} elsif ( m/group: (\w+\d+)\s.+function: (\S+)/ ) {
my ($pin, $function) = ($1,$2);
$pin_function->{$pin} = "$device $function";