May be I missing something, but this line prevent open gpio in other places of code.
May be better open in externally and just pass to lora module same way as SPI?
Attempt to call gpio:open() in any other place cause this:
E (8694) gpio_driver: Only a single GPIO driver can be opened.
Failed to load port "gpio". Ensure the port is configured properly in the build.