Revert "Revert "return state variable if configured as output""

This reverts commit a1e01560540535ac50ccd64186d7cba1f7173d94.
device tree from combined dgpio/iom