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'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.