Lines Matching refs:spi_freq
87 unsigned int spi_freq; /* SPI bus clock frequency */ member
746 return snprintf(buf, PAGE_SIZE, "%d\n", adc->spi_freq); in dfsdm_adc_audio_get_spiclk()
751 unsigned int spi_freq) in dfsdm_adc_set_samp_freq() argument
757 oversamp = DIV_ROUND_CLOSEST(spi_freq, sample_freq); in dfsdm_adc_set_samp_freq()
758 if (spi_freq % sample_freq) in dfsdm_adc_set_samp_freq()
761 sample_freq, spi_freq / oversamp); in dfsdm_adc_set_samp_freq()
767 adc->sample_freq = spi_freq / oversamp; in dfsdm_adc_set_samp_freq()
781 unsigned int spi_freq; in dfsdm_adc_audio_set_spiclk() local
789 ret = kstrtoint(buf, 0, &spi_freq); in dfsdm_adc_audio_set_spiclk()
793 if (!spi_freq) in dfsdm_adc_audio_set_spiclk()
797 ret = dfsdm_adc_set_samp_freq(indio_dev, sample_freq, spi_freq); in dfsdm_adc_audio_set_spiclk()
801 adc->spi_freq = spi_freq; in dfsdm_adc_audio_set_spiclk()
1258 unsigned int spi_freq; in stm32_dfsdm_write_raw() local
1263 spi_freq = adc->dfsdm->spi_master_freq; in stm32_dfsdm_write_raw()
1267 spi_freq = adc->dfsdm->spi_master_freq / 2; in stm32_dfsdm_write_raw()
1270 spi_freq = adc->spi_freq; in stm32_dfsdm_write_raw()
1283 adc->sample_freq, spi_freq / val); in stm32_dfsdm_write_raw()
1285 adc->sample_freq = spi_freq / val; in stm32_dfsdm_write_raw()
1298 ret = dfsdm_adc_set_samp_freq(indio_dev, val, spi_freq); in stm32_dfsdm_write_raw()
1626 adc->spi_freq = adc->dfsdm->spi_master_freq; in stm32_dfsdm_audio_init()