How to control hardware pwm on Raspberry Pi

I don’t think there is an “out-of-the-box” generic way to handle GPIO PWM, currently, but the following thread might be a good starting point for you