a circuit for controlling charging includes a transistor provided on a charging path between a position of a charging terminal and a position of a battery , an input voltage detecting circuit configured to detect a potential of a point on the charging path coupled to the charging terminal &# 39 ; s side of the transistor , and a drive circuit configured to control an on resistance of the transistor between a conductive state and a nonconductive state in response to the potential detected by the input voltage detecting circuit .