Mixed-mode adaptive ripple canceller for switching regulators