Input protection and switching