UPSTREAM: pwm: Keep PWM state in sync with hardware state