Current mode control mode in switching power supply