Switched mode Battery Charger CC/CV operation
CA1 amplifies the sensed voltage drop from the current sense resistor. It is not an Op Amp. The CA indicates it some form of Current Amp.
VA is a voltage amp that scales down the battery voltage and amplifies its voltage above the Vref=2.465
The two diodes then form an analog OR gate where the higher voltage controls the current rate of charge.  Starting in CC mode the diode for the VA is too low. 
When the VA diode rises above then it enters CV mode and the diode OR output remains at the same voltage. 
The PROG pin filters the rate of change to make the loop stable from overshoot and ringing.
the charger is controlled by a voltage controlled current from the diode OR node such that a rising voltage above CA2+=Vref turns off the battery charger current.
-but this current pump is triggered in spurts controlled by a comparator for PWM that regulates the pull-up current driver by regulating the DIODE OR node voltage.


is that voltage goes up and down the compared turns the pull up driver Qsw on and off and thus adjusting its duty cycle, according to the state of charge and hence the name PWM.