A hysteretic regulator may be set to an active mode when voltage at an
output falls to a first threshold level. In the active mode, charge is
applied to an output node by a current having a set limit value. The
regulator is set to an inactive mode when the voltage at the output node
rises to a second threshold level. The current limit value is
automatically adjusted as a function of average regulator current. An
indication of average regulator current may be obtained by charging a
sense capacitor during the active mode and discharging the sense
capacitor during the inactive mode. The voltage of the sense capacitor,
which is representative of the average regulator current, is used to
generate an offset adjustment applied to a regulator controller.