Update gpio.c

from SC-02B kernel (same philosophy)