Lines Matching refs:raw_prd
106 unsigned long tmo_ms, u32 *raw_prd, in stm32_pwm_raw_capture() argument
137 *raw_prd = priv->capture[2] - priv->capture[0]; in stm32_pwm_raw_capture()
139 *raw_prd = priv->max_arr - priv->capture[0] + priv->capture[2]; in stm32_pwm_raw_capture()
149 if (*raw_dty > *raw_prd) { in stm32_pwm_raw_capture()
156 *raw_dty -= *raw_prd; in stm32_pwm_raw_capture()
173 u32 raw_prd = 0, raw_dty = 0; in stm32_pwm_capture() local
219 ret = stm32_pwm_raw_capture(priv, pwm, tmo_ms, &raw_prd, &raw_dty); in stm32_pwm_capture()
228 if (raw_prd) { in stm32_pwm_capture()
231 scale = max_arr / min(max_arr, raw_prd); in stm32_pwm_capture()
240 ret = stm32_pwm_raw_capture(priv, pwm, tmo_ms, &raw_prd, in stm32_pwm_capture()
247 prd = (unsigned long long)raw_prd * (psc + 1) * NSEC_PER_SEC; in stm32_pwm_capture()
252 if (raw_prd >= (priv->max_arr - 0x1000) >> (icpsc + 1)) in stm32_pwm_capture()
268 ret = stm32_pwm_raw_capture(priv, pwm, tmo_ms, &raw_prd, &raw_dty); in stm32_pwm_capture()
272 if (raw_dty >= (raw_prd >> icpsc)) { in stm32_pwm_capture()
299 raw_dty = (raw_prd >> icpsc) - (raw_prd - raw_dty); in stm32_pwm_capture()
303 prd = (unsigned long long)raw_prd * (psc + 1) * NSEC_PER_SEC; in stm32_pwm_capture()