currently the bcm2835_pwm driver only allows you to control PWM channel 1. The modifications create additional sysctl variables and the supporting code to independently control PWM channel 2 as well.
Both PWM output channels share the same clock. Each channel's mode, period, and ratio can be modified and controlled independently using the sysctl variables, as before, except that the new variables 'mode2' 'ratio2' and 'period2' were added to control channel 2. The existing variable names were left as-is.
Additional information regarding the CTL register bits was added as a comment, basically copied from the bcm2835 peripheral documentation with an appropriate reference to that document. This can be removed if there's some reason not to put it here. However, it helps to explain the 'magic bit numbers' that were being assigned, and may allow someone to support additional features (like the FIFO) in the future.
It is worth pointing out that the default DTB for the Raspberry Pi model 2 has GPIO pins 40 and 45 set to 'ALT0', which enables the PWM output on them. These pins are connected to the audio output jacks, since (as it appears) the PWM device is also used by the video core to generate audio output.
At some point an overlay may need to be created that disables the audio device so that it will not interfere with the PWM device. As it stands now, if you use the audio output jacks for PWM output, it should work without an overlay, if you do not use any audio output. Otherwise, it's extremely likely that the bcm2835_audio and bcm2835_pwm devices will interfere with one another.