How does the power supply determine which mode it should be in?