[PATCH v5 14/46] pwm: keep PWM state in sync with hardware state