UPSTREAM: pwm: Add a helper to prepare a new PWM state