revert some of the changes in gpio_input.c