more GPIO initialization refactoring