Lines Matching refs:cnvst_pwm_state

550 	struct pwm_state cnvst_pwm_state;  in ad7606_pwm_set_high()  local
553 pwm_get_state(st->cnvst_pwm, &cnvst_pwm_state); in ad7606_pwm_set_high()
554 cnvst_pwm_state.enabled = true; in ad7606_pwm_set_high()
555 cnvst_pwm_state.duty_cycle = cnvst_pwm_state.period; in ad7606_pwm_set_high()
557 ret = pwm_apply_might_sleep(st->cnvst_pwm, &cnvst_pwm_state); in ad7606_pwm_set_high()
564 struct pwm_state cnvst_pwm_state; in ad7606_pwm_set_low() local
567 pwm_get_state(st->cnvst_pwm, &cnvst_pwm_state); in ad7606_pwm_set_low()
568 cnvst_pwm_state.enabled = true; in ad7606_pwm_set_low()
569 cnvst_pwm_state.duty_cycle = 0; in ad7606_pwm_set_low()
571 ret = pwm_apply_might_sleep(st->cnvst_pwm, &cnvst_pwm_state); in ad7606_pwm_set_low()
579 struct pwm_state cnvst_pwm_state; in ad7606_pwm_set_swing() local
581 pwm_get_state(st->cnvst_pwm, &cnvst_pwm_state); in ad7606_pwm_set_swing()
582 cnvst_pwm_state.enabled = true; in ad7606_pwm_set_swing()
583 cnvst_pwm_state.duty_cycle = cnvst_pwm_state.period / 2; in ad7606_pwm_set_swing()
585 return pwm_apply_might_sleep(st->cnvst_pwm, &cnvst_pwm_state); in ad7606_pwm_set_swing()
591 struct pwm_state cnvst_pwm_state; in ad7606_pwm_is_swinging() local
593 pwm_get_state(st->cnvst_pwm, &cnvst_pwm_state); in ad7606_pwm_is_swinging()
595 return cnvst_pwm_state.duty_cycle != cnvst_pwm_state.period && in ad7606_pwm_is_swinging()
596 cnvst_pwm_state.duty_cycle != 0; in ad7606_pwm_is_swinging()
601 struct pwm_state cnvst_pwm_state; in ad7606_set_sampling_freq() local
609 pwm_get_state(st->cnvst_pwm, &cnvst_pwm_state); in ad7606_set_sampling_freq()
610 is_high = cnvst_pwm_state.duty_cycle == cnvst_pwm_state.period; in ad7606_set_sampling_freq()
612 cnvst_pwm_state.period = DIV_ROUND_UP_ULL(NSEC_PER_SEC, freq); in ad7606_set_sampling_freq()
613 cnvst_pwm_state.polarity = PWM_POLARITY_NORMAL; in ad7606_set_sampling_freq()
615 cnvst_pwm_state.duty_cycle = cnvst_pwm_state.period; in ad7606_set_sampling_freq()
617 cnvst_pwm_state.duty_cycle = cnvst_pwm_state.period / 2; in ad7606_set_sampling_freq()
619 cnvst_pwm_state.duty_cycle = 0; in ad7606_set_sampling_freq()
621 return pwm_apply_might_sleep(st->cnvst_pwm, &cnvst_pwm_state); in ad7606_set_sampling_freq()
763 struct pwm_state cnvst_pwm_state; in ad7606_read_raw() local
785 pwm_get_state(st->cnvst_pwm, &cnvst_pwm_state); in ad7606_read_raw()
786 *val = DIV_ROUND_CLOSEST_ULL(NSEC_PER_SEC, cnvst_pwm_state.period); in ad7606_read_raw()