Home
last modified time | relevance | path

Searched refs:speed_hz (Results 1 – 25 of 100) sorted by relevance

1234

/linux-6.1.9/drivers/spi/
Dspi-amd.c81 u32 speed_hz; member
95 unsigned int speed_hz; member
239 static int amd_set_spi_freq(struct amd_spi *amd_spi, u32 speed_hz) in amd_set_spi_freq() argument
243 if (speed_hz < AMD_SPI_MIN_HZ) in amd_set_spi_freq()
247 if (speed_hz >= amd_spi_freq[i].speed_hz) in amd_set_spi_freq()
250 if (amd_spi->speed_hz == amd_spi_freq[i].speed_hz) in amd_set_spi_freq()
253 amd_spi->speed_hz = amd_spi_freq[i].speed_hz; in amd_set_spi_freq()
260 if (amd_spi->speed_hz == AMD_SPI_MAX_HZ) in amd_set_spi_freq()
287 if (xfer->speed_hz) in amd_spi_fifo_xfer()
288 amd_set_spi_freq(amd_spi, xfer->speed_hz); in amd_spi_fifo_xfer()
Dspidev.c80 u32 speed_hz; member
119 .speed_hz = spidev->speed_hz, in spidev_sync_write()
134 .speed_hz = spidev->speed_hz, in spidev_sync_read()
277 k_tmp->speed_hz = u_tmp->speed_hz; in spidev_message()
280 if (!k_tmp->speed_hz) in spidev_message()
281 k_tmp->speed_hz = spidev->speed_hz; in spidev_message()
292 k_tmp->speed_hz ? : spidev->spi->max_speed_hz); in spidev_message()
406 retval = put_user(spidev->speed_hz, (__u32 __user *)arg); in spidev_ioctl()
484 spidev->speed_hz = tmp; in spidev_ioctl()
485 dev_dbg(&spi->dev, "%d Hz (max)\n", spidev->speed_hz); in spidev_ioctl()
[all …]
Dspi-oc-tiny.c46 unsigned int speed_hz; member
73 if (t->speed_hz && t->speed_hz != hw->speed_hz) in tiny_spi_setup_transfer()
74 baud = tiny_spi_baud(spi, t->speed_hz); in tiny_spi_setup_transfer()
85 if (spi->max_speed_hz != hw->speed_hz) { in tiny_spi_setup()
86 hw->speed_hz = spi->max_speed_hz; in tiny_spi_setup()
87 hw->baud = tiny_spi_baud(spi, hw->speed_hz); in tiny_spi_setup()
Dspi-qcom-qspi.c228 static int qcom_qspi_set_speed(struct qcom_qspi *ctrl, unsigned long speed_hz) in qcom_qspi_set_speed() argument
233 if (speed_hz == ctrl->last_speed) in qcom_qspi_set_speed()
237 ret = dev_pm_opp_set_rate(ctrl->dev, speed_hz * 4); in qcom_qspi_set_speed()
247 avg_bw_cpu = Bps_to_icc(speed_hz); in qcom_qspi_set_speed()
255 ctrl->last_speed = speed_hz; in qcom_qspi_set_speed()
266 unsigned long speed_hz; in qcom_qspi_transfer_one() local
269 speed_hz = slv->max_speed_hz; in qcom_qspi_transfer_one()
270 if (xfer->speed_hz) in qcom_qspi_transfer_one()
271 speed_hz = xfer->speed_hz; in qcom_qspi_transfer_one()
273 ret = qcom_qspi_set_speed(ctrl, speed_hz); in qcom_qspi_transfer_one()
Dspi-mpc52xx-psc.c47 int speed_hz; member
58 cs->speed_hz = (t && t->speed_hz) in mpc52xx_psc_spi_transfer_setup()
59 ? t->speed_hz : spi->max_speed_hz; in mpc52xx_psc_spi_transfer_setup()
98 if (cs->speed_hz) in mpc52xx_psc_spi_activate_cs()
99 ccr |= (MCLK / cs->speed_hz - 1) & 0xFF; in mpc52xx_psc_spi_activate_cs()
207 if (t->bits_per_word || t->speed_hz) { in mpc52xx_psc_spi_transfer_one_message()
254 cs->speed_hz = spi->max_speed_hz; in mpc52xx_psc_spi_setup()
Dspi-jcore.c40 unsigned int speed_hz; member
85 if (speed == hw->speed_hz) in jcore_spi_baudrate()
87 hw->speed_hz = speed; in jcore_spi_baudrate()
112 jcore_spi_baudrate(hw, t->speed_hz); in jcore_spi_txrx()
Dspi-cadence.c118 u32 speed_hz; member
259 if (xspi->speed_hz != transfer->speed_hz) { in cdns_spi_config_clock_freq()
263 (frequency / (2 << baud_rate_val)) > transfer->speed_hz) in cdns_spi_config_clock_freq()
269 xspi->speed_hz = frequency / (2 << baud_rate_val); in cdns_spi_config_clock_freq()
294 xspi->speed_hz); in cdns_spi_setup_transfer()
592 xspi->speed_hz = master->max_speed_hz; in cdns_spi_probe()
Dspi-npcm-pspi.c31 u32 speed_hz; member
186 if (!priv->is_save_param || priv->speed_hz != t->speed_hz) { in npcm_pspi_setup_transfer()
187 npcm_pspi_set_baudrate(priv, t->speed_hz); in npcm_pspi_setup_transfer()
188 priv->speed_hz = t->speed_hz; in npcm_pspi_setup_transfer()
Dspi-omap2-mcspi.c883 static u32 omap2_mcspi_calc_divisor(u32 speed_hz) in omap2_mcspi_calc_divisor() argument
888 if (speed_hz >= (OMAP2_MCSPI_MAX_FREQ >> div)) in omap2_mcspi_calc_divisor()
902 u32 speed_hz = spi->max_speed_hz; in omap2_mcspi_setup_transfer() local
911 if (t && t->speed_hz) in omap2_mcspi_setup_transfer()
912 speed_hz = t->speed_hz; in omap2_mcspi_setup_transfer()
914 speed_hz = min_t(u32, speed_hz, OMAP2_MCSPI_MAX_FREQ); in omap2_mcspi_setup_transfer()
915 if (speed_hz < (OMAP2_MCSPI_MAX_FREQ / OMAP2_MCSPI_MAX_DIVIDER)) { in omap2_mcspi_setup_transfer()
916 clkd = omap2_mcspi_calc_divisor(speed_hz); in omap2_mcspi_setup_transfer()
917 speed_hz = OMAP2_MCSPI_MAX_FREQ >> clkd; in omap2_mcspi_setup_transfer()
920 div = (OMAP2_MCSPI_MAX_FREQ + speed_hz - 1) / speed_hz; in omap2_mcspi_setup_transfer()
[all …]
Dspi-sun4i.c270 if (mclk_rate < (2 * tfr->speed_hz)) { in sun4i_spi_transfer_one()
271 clk_set_rate(sspi->mclk, 2 * tfr->speed_hz); in sun4i_spi_transfer_one()
289 div = mclk_rate / (2 * tfr->speed_hz); in sun4i_spi_transfer_one()
296 div = ilog2(mclk_rate) - ilog2(tfr->speed_hz); in sun4i_spi_transfer_one()
328 tx_time = max(tfr->len * 8 * 2 / (tfr->speed_hz / 1000), 100U); in sun4i_spi_transfer_one()
336 dev_name(&spi->dev), tfr->len, tfr->speed_hz, in sun4i_spi_transfer_one()
Dspi-rspi.c184 u32 speed_hz; member
260 spbr = DIV_ROUND_UP(clksrc, 2 * rspi->speed_hz) - 1; in rspi_set_rate()
268 rspi->speed_hz = DIV_ROUND_UP(clksrc, (2U << brdv) * (spbr + 1)); in rspi_set_rate()
349 if (rspi->speed_hz >= clksrc) { in qspi_set_config_register()
351 rspi->speed_hz = clksrc; in qspi_set_config_register()
353 spbr = DIV_ROUND_UP(clksrc, 2 * rspi->speed_hz); in qspi_set_config_register()
359 rspi->speed_hz = DIV_ROUND_UP(clksrc, (2U << brdv) * spbr); in qspi_set_config_register()
711 xfer->effective_speed_hz = rspi->speed_hz; in rspi_common_transfer()
868 xfer->effective_speed_hz = rspi->speed_hz; in qspi_transfer_one()
989 rspi->speed_hz = spi->max_speed_hz; in rspi_prepare_message()
[all …]
Dspi-hisi-kunpeng.c116 u32 speed_hz; /* baud rate */ member
295 struct hisi_chip_data *chip, u32 speed_hz) in hisi_calc_effective_speed() argument
300 chip->clk_div = DIV_ROUND_UP(master->max_speed_hz, speed_hz) + 1; in hisi_calc_effective_speed()
306 if (chip->speed_hz != effective_speed) { in hisi_calc_effective_speed()
308 chip->speed_hz = effective_speed; in hisi_calc_effective_speed()
385 hisi_calc_effective_speed(master, chip, transfer->speed_hz); in hisi_spi_transfer_one()
Dspi-pic32.c105 u32 speed_hz; /* spi-clk rate */ member
456 if (pic32s->speed_hz != spi->max_speed_hz) { in pic32_spi_prepare_message()
458 pic32s->speed_hz = spi->max_speed_hz; in pic32_spi_prepare_message()
516 if (transfer->speed_hz && (transfer->speed_hz != pic32s->speed_hz)) { in pic32_spi_one_transfer()
517 pic32_spi_set_clk_rate(pic32s, transfer->speed_hz); in pic32_spi_one_transfer()
518 pic32s->speed_hz = transfer->speed_hz; in pic32_spi_one_transfer()
Dspi-lantiq-ssc.c181 unsigned int speed_hz; member
433 unsigned int speed_hz = t->speed_hz; in hw_setup_transfer() local
438 speed_hz != spi->speed_hz) { in hw_setup_transfer()
440 hw_setup_speed_hz(spi, speed_hz); in hw_setup_transfer()
444 spi->speed_hz = speed_hz; in hw_setup_transfer()
766 do_div(timeout, spi->speed_hz); in lantiq_ssc_bussy_work()
965 spi->speed_hz = 0; in lantiq_ssc_probe()
Dspi-mpc512x-psc.c72 int speed_hz; member
83 cs->speed_hz = (t && t->speed_hz) in mpc512x_psc_spi_transfer_setup()
84 ? t->speed_hz : spi->max_speed_hz; in mpc512x_psc_spi_transfer_setup()
121 speed = cs->speed_hz; in mpc512x_psc_spi_activate_cs()
389 cs->speed_hz = spi->max_speed_hz; in mpc512x_psc_spi_setup()
Dspi-fsl-lpspi.c91 u32 speed_hz; member
305 if (config.speed_hz > perclk_rate / 2) { in fsl_lpspi_set_bitrate()
312 scldiv = perclk_rate / config.speed_hz / (1 << prescale) - 2; in fsl_lpspi_set_bitrate()
326 perclk_rate, config.speed_hz, prescale, scldiv); in fsl_lpspi_set_bitrate()
423 fsl_lpspi->config.speed_hz = t->speed_hz; in fsl_lpspi_setup_transfer()
429 if (!fsl_lpspi->config.speed_hz) in fsl_lpspi_setup_transfer()
430 fsl_lpspi->config.speed_hz = spi->max_speed_hz; in fsl_lpspi_setup_transfer()
536 timeout = (8 + 4) * size / fsl_lpspi->config.speed_hz; in fsl_lpspi_calculate_timeout()
Dspi-xcomm.c78 if (t->speed_hz != spi_xcomm->current_speed) { in spi_xcomm_setup_transfer()
81 divider = DIV_ROUND_UP(SPI_XCOMM_CLOCK, t->speed_hz); in spi_xcomm_setup_transfer()
89 spi_xcomm->current_speed = t->speed_hz; in spi_xcomm_setup_transfer()
Dspi-uniphier.c42 u32 speed_hz; member
239 if (!priv->is_save_param || priv->speed_hz != t->speed_hz) { in uniphier_spi_setup_transfer()
240 uniphier_spi_set_baudrate(spi, t->speed_hz); in uniphier_spi_setup_transfer()
241 priv->speed_hz = t->speed_hz; in uniphier_spi_setup_transfer()
548 threshold = DIV_ROUND_UP(SSI_POLL_TIMEOUT_US * priv->speed_hz, in uniphier_spi_transfer_one()
Dspi-bcm63xx-hsspi.c110 u32 speed_hz; member
136 reg = DIV_ROUND_UP(2048, DIV_ROUND_UP(bs->speed_hz, hz)); in bcm63xx_hsspi_set_clk()
167 bcm63xx_hsspi_set_clk(bs, spi, t->speed_hz); in bcm63xx_hsspi_do_txrx()
399 bs->speed_hz = rate; in bcm63xx_hsspi_probe()
/linux-6.1.9/drivers/gpu/drm/
Ddrm_mipi_dbi.c781 tr.speed_hz = mipi_dbi_spi_cmd_max_speed(spi, len); in mipi_dbi_spi1e_transfer()
897 tr.speed_hz = mipi_dbi_spi_cmd_max_speed(spi, len); in mipi_dbi_spi1_transfer()
946 u32 speed_hz = min_t(u32, MIPI_DBI_MAX_SPI_READ_SPEED, in mipi_dbi_typec1_command_read() local
950 .speed_hz = speed_hz, in mipi_dbi_typec1_command_read()
955 .speed_hz = speed_hz, in mipi_dbi_typec1_command_read()
1019 u32 speed_hz = min_t(u32, MIPI_DBI_MAX_SPI_READ_SPEED, in mipi_dbi_typec3_command_read() local
1023 .speed_hz = speed_hz, in mipi_dbi_typec3_command_read()
1027 .speed_hz = speed_hz, in mipi_dbi_typec3_command_read()
1084 u32 speed_hz; in mipi_dbi_typec3_command() local
1093 speed_hz = mipi_dbi_spi_cmd_max_speed(spi, 1); in mipi_dbi_typec3_command()
[all …]
/linux-6.1.9/drivers/gpu/drm/tiny/
Dili9486.c47 u32 speed_hz; in waveshare_command() local
64 speed_hz = mipi_dbi_spi_cmd_max_speed(spi, 2); in waveshare_command()
65 ret = mipi_dbi_spi_transfer(spi, speed_hz, 8, buf, 2); in waveshare_command()
74 speed_hz = mipi_dbi_spi_cmd_max_speed(spi, num); in waveshare_command()
79 ret = mipi_dbi_spi_transfer(spi, speed_hz, 8, data, num); in waveshare_command()
Dili9225.c310 u32 speed_hz; in ili9225_dbi_command() local
314 speed_hz = mipi_dbi_spi_cmd_max_speed(spi, 1); in ili9225_dbi_command()
315 ret = mipi_dbi_spi_transfer(spi, speed_hz, 8, cmd, 1); in ili9225_dbi_command()
323 speed_hz = mipi_dbi_spi_cmd_max_speed(spi, num); in ili9225_dbi_command()
325 return mipi_dbi_spi_transfer(spi, speed_hz, bpw, par, num); in ili9225_dbi_command()
/linux-6.1.9/net/nfc/nci/
Dspi.c49 t.speed_hz = nspi->xfer_speed_hz; in __nci_spi_send()
190 tx.speed_hz = nspi->xfer_speed_hz; in __nci_spi_read()
197 rx.speed_hz = nspi->xfer_speed_hz; in __nci_spi_read()
222 rx.speed_hz = nspi->xfer_speed_hz; in __nci_spi_read()
/linux-6.1.9/drivers/media/dvb-frontends/cxd2880/
Dcxd2880_spi_device.c67 u32 speed_hz) in cxd2880_spi_device_initialize() argument
89 spi->max_speed_hz = speed_hz; in cxd2880_spi_device_initialize()
/linux-6.1.9/sound/soc/codecs/
Dwm0010.c441 xfer->t.speed_hz = wm0010->sysclk / 6; in wm0010_firmware_load()
443 xfer->t.speed_hz = wm0010->max_spi_freq; in wm0010_firmware_load()
447 xfer->t.speed_hz = wm0010->board_max_spi_speed; in wm0010_firmware_load()
451 wm0010->max_spi_freq = xfer->t.speed_hz; in wm0010_firmware_load()
535 t.speed_hz = wm0010->sysclk / 10; in wm0010_stage2_load()
539 t.speed_hz); in wm0010_stage2_load()
668 t.speed_hz = wm0010->sysclk / 6; in wm0010_boot()

1234