[kernel] make gpio_dev compatible with GPIOLIB & GPIO_SYSFS (closes #4016)