Lines Matching refs:spi_freq
84 unsigned int spi_freq; /* SPI bus clock frequency */ member
675 return snprintf(buf, PAGE_SIZE, "%d\n", adc->spi_freq); in dfsdm_adc_audio_get_spiclk()
680 unsigned int spi_freq) in dfsdm_adc_set_samp_freq() argument
686 oversamp = DIV_ROUND_CLOSEST(spi_freq, sample_freq); in dfsdm_adc_set_samp_freq()
687 if (spi_freq % sample_freq) in dfsdm_adc_set_samp_freq()
690 sample_freq, spi_freq / oversamp); in dfsdm_adc_set_samp_freq()
696 adc->sample_freq = spi_freq / oversamp; in dfsdm_adc_set_samp_freq()
710 unsigned int spi_freq; in dfsdm_adc_audio_set_spiclk() local
718 ret = kstrtoint(buf, 0, &spi_freq); in dfsdm_adc_audio_set_spiclk()
722 if (!spi_freq) in dfsdm_adc_audio_set_spiclk()
726 ret = dfsdm_adc_set_samp_freq(indio_dev, sample_freq, spi_freq); in dfsdm_adc_audio_set_spiclk()
730 adc->spi_freq = spi_freq; in dfsdm_adc_audio_set_spiclk()
1173 unsigned int spi_freq; in stm32_dfsdm_write_raw() local
1178 spi_freq = adc->dfsdm->spi_master_freq; in stm32_dfsdm_write_raw()
1182 spi_freq = adc->dfsdm->spi_master_freq / 2; in stm32_dfsdm_write_raw()
1185 spi_freq = adc->spi_freq; in stm32_dfsdm_write_raw()
1198 adc->sample_freq, spi_freq / val); in stm32_dfsdm_write_raw()
1200 adc->sample_freq = spi_freq / val; in stm32_dfsdm_write_raw()
1213 ret = dfsdm_adc_set_samp_freq(indio_dev, val, spi_freq); in stm32_dfsdm_write_raw()
1425 adc->spi_freq = adc->dfsdm->spi_master_freq; in stm32_dfsdm_audio_init()