Lines Matching refs:ccer
47 u32 ccer; in active_channels() local
49 regmap_read(dev->regmap, TIM_CCER, &ccer); in active_channels()
51 return ccer & TIM_CCER_CCXE; in active_channels()
55 u32 ccer; member
75 .ccer = 0, in stm32_pwm_round_waveform_tohw()
85 wfhw->ccer = TIM_CCER_CCxE(ch + 1); in stm32_pwm_round_waveform_tohw()
87 wfhw->ccer |= TIM_CCER_CCxNE(ch + 1); in stm32_pwm_round_waveform_tohw()
178 wfhw->ccer |= TIM_CCER_CCxP(ch + 1); in stm32_pwm_round_waveform_tohw()
180 wfhw->ccer |= TIM_CCER_CCxNP(ch + 1); in stm32_pwm_round_waveform_tohw()
191 rate, wfhw->ccer, wfhw->psc, wfhw->arr, wfhw->ccr); in stm32_pwm_round_waveform_tohw()
224 if (wfhw->ccer & TIM_CCER_CCxE(ch + 1)) { in stm32_pwm_round_waveform_fromhw()
235 if (wfhw->ccer & TIM_CCER_CCxP(ch + 1)) { in stm32_pwm_round_waveform_fromhw()
247 pwm->hwpwm, wfhw->ccer, wfhw->psc, wfhw->arr, wfhw->ccr, rate, in stm32_pwm_round_waveform_fromhw()
272 ret = regmap_read(priv->regmap, TIM_CCER, &wfhw->ccer); in stm32_pwm_read_waveform()
276 if (wfhw->ccer & TIM_CCER_CCxE(ch + 1)) { in stm32_pwm_read_waveform()
315 if (wfhw->ccer & TIM_CCER_CCxE(ch + 1)) { in stm32_pwm_write_waveform()
316 u32 ccer, mask; in stm32_pwm_write_waveform() local
320 ret = regmap_read(priv->regmap, TIM_CCER, &ccer); in stm32_pwm_write_waveform()
325 if (ccer & ~TIM_CCER_CCxE(ch + 1) & TIM_CCER_CCXE) { in stm32_pwm_write_waveform()
362 ret = regmap_update_bits(priv->regmap, TIM_CCER, mask, wfhw->ccer); in stm32_pwm_write_waveform()
386 if (!(ccer & TIM_CCER_CCxE(ch + 1))) { in stm32_pwm_write_waveform()
393 ccer = (ccer & ~mask) | (wfhw->ccer & mask); in stm32_pwm_write_waveform()
394 regmap_write(priv->regmap, TIM_CCER, ccer); in stm32_pwm_write_waveform()
405 u32 mask, ccer; in stm32_pwm_write_waveform() local
411 ret = regmap_read(priv->regmap, TIM_CCER, &ccer); in stm32_pwm_write_waveform()
415 if (ccer & mask) { in stm32_pwm_write_waveform()
416 ccer = ccer & ~mask; in stm32_pwm_write_waveform()
418 ret = regmap_write(priv->regmap, TIM_CCER, ccer); in stm32_pwm_write_waveform()
422 if (!(ccer & TIM_CCER_CCXE)) { in stm32_pwm_write_waveform()
780 u32 ccer; in stm32_pwm_detect_complementary() local
787 regmap_read(priv->regmap, TIM_CCER, &ccer); in stm32_pwm_detect_complementary()
790 priv->have_complementary_output = (ccer != 0); in stm32_pwm_detect_complementary()
796 u32 ccer, ccer_backup; in stm32_pwm_detect_channels() local
804 regmap_read(regmap, TIM_CCER, &ccer); in stm32_pwm_detect_channels()
809 return hweight32(ccer & TIM_CCER_CCXE); in stm32_pwm_detect_channels()
879 u32 ccer, mask; in stm32_pwm_suspend() local
882 ccer = active_channels(priv); in stm32_pwm_suspend()
886 if (ccer & mask) { in stm32_pwm_suspend()