optimized bus powered peripheral battery charging includes a circuit to initiate a change in an advanced configuration and power interface state in a controller allowing charging of a peripheral device battery , the circuit including a signal converter coupled between an input port and the controller to sense when a the peripheral device battery is coupled to an input port and to restrict the controller from changing acpi state multiple times for a given peripheral device battery coupling ; and a ground loop detector coupled in parallel to the signal converter between the input port and the controller to allow the controller to know that the peripheral device battery has maintained being coupled to the input port .