gpio: Add support for reading GPIO pin values

* Also change debug output (only for troubleshooting)