gpio: normalize variables for gpio and handle->pin