Lines Matching full:slice
54 int slice = pwm_rpi_channel_to_slice(ch); in pwm_rpi_get_cycles_per_sec() local
62 const struct pwm_rpi_slice_config *slice_config = &cfg->slice_configs[slice]; in pwm_rpi_get_cycles_per_sec()
85 static void pwm_rpi_set_channel_polarity(const struct device *dev, int slice, in pwm_rpi_set_channel_polarity() argument
90 bool pwm_polarity_a = (cfg->pwm_controller->slice[slice].csr & PWM_CH0_CSR_A_INV_BITS) > 0; in pwm_rpi_set_channel_polarity()
91 bool pwm_polarity_b = (cfg->pwm_controller->slice[slice].csr & PWM_CH0_CSR_B_INV_BITS) > 0; in pwm_rpi_set_channel_polarity()
99 pwm_set_output_polarity(slice, pwm_polarity_a, pwm_polarity_b); in pwm_rpi_set_channel_polarity()
106 int slice = pwm_rpi_channel_to_slice(ch); in pwm_rpi_set_cycles() local
108 /* this is the channel within a pwm slice */ in pwm_rpi_set_cycles()
117 div_int = cfg->slice_configs[slice].integral; in pwm_rpi_set_cycles()
118 div_frac = cfg->slice_configs[slice].frac; in pwm_rpi_set_cycles()
140 pwm_rpi_set_channel_polarity(dev, slice, pico_channel, in pwm_rpi_set_cycles()
142 pwm_set_wrap(slice, period_cycles - 1); in pwm_rpi_set_cycles()
143 pwm_set_chan_level(slice, pico_channel, pulse_cycles); in pwm_rpi_set_cycles()
144 pwm_set_clkdiv_int_frac(slice, div_int, div_frac); in pwm_rpi_set_cycles()