gpio: rename
gpio: test -ve case when looking up pins
gpio: simplify and test the logic