/linux-6.6.21/drivers/spi/ |
D | spi-amd.c | 81 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()
|
D | spi-oc-tiny.c | 46 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()
|
D | spi-mpc52xx-psc.c | 41 int speed_hz; member 52 cs->speed_hz = (t && t->speed_hz) in mpc52xx_psc_spi_transfer_setup() 53 ? t->speed_hz : spi->max_speed_hz; in mpc52xx_psc_spi_transfer_setup() 92 if (cs->speed_hz) in mpc52xx_psc_spi_activate_cs() 93 ccr |= (MCLK / cs->speed_hz - 1) & 0xFF; in mpc52xx_psc_spi_activate_cs() 190 if (t->bits_per_word || t->speed_hz) { in mpc52xx_psc_spi_transfer_one_message() 232 cs->speed_hz = spi->max_speed_hz; in mpc52xx_psc_spi_setup()
|
D | spidev.c | 81 u32 speed_hz; member 129 .speed_hz = spidev->speed_hz, in spidev_sync_write() 144 .speed_hz = spidev->speed_hz, in spidev_sync_read() 287 k_tmp->speed_hz = u_tmp->speed_hz; in spidev_message() 290 if (!k_tmp->speed_hz) in spidev_message() 291 k_tmp->speed_hz = spidev->speed_hz; in spidev_message() 302 k_tmp->speed_hz ? : spidev->spi->max_speed_hz); in spidev_message() 416 retval = put_user(spidev->speed_hz, (__u32 __user *)arg); in spidev_ioctl() 494 spidev->speed_hz = tmp; in spidev_ioctl() 495 dev_dbg(&spi->dev, "%d Hz (max)\n", spidev->speed_hz); in spidev_ioctl() [all …]
|
D | spi-jcore.c | 40 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()
|
D | spi-npcm-pspi.c | 31 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()
|
D | spi-omap2-mcspi.c | 885 static u32 omap2_mcspi_calc_divisor(u32 speed_hz, u32 ref_clk_hz) in omap2_mcspi_calc_divisor() argument 890 if (speed_hz >= (ref_clk_hz >> div)) in omap2_mcspi_calc_divisor() 904 u32 speed_hz = spi->max_speed_hz; in omap2_mcspi_setup_transfer() local 913 if (t && t->speed_hz) in omap2_mcspi_setup_transfer() 914 speed_hz = t->speed_hz; in omap2_mcspi_setup_transfer() 917 speed_hz = min_t(u32, speed_hz, ref_clk_hz); in omap2_mcspi_setup_transfer() 918 if (speed_hz < (ref_clk_hz / OMAP2_MCSPI_MAX_DIVIDER)) { in omap2_mcspi_setup_transfer() 919 clkd = omap2_mcspi_calc_divisor(speed_hz, ref_clk_hz); in omap2_mcspi_setup_transfer() 920 speed_hz = ref_clk_hz >> clkd; in omap2_mcspi_setup_transfer() 923 div = (ref_clk_hz + speed_hz - 1) / speed_hz; in omap2_mcspi_setup_transfer() [all …]
|
D | spi-qcom-qspi.c | 272 static int qcom_qspi_set_speed(struct qcom_qspi *ctrl, unsigned long speed_hz) in qcom_qspi_set_speed() argument 277 if (speed_hz == ctrl->last_speed) in qcom_qspi_set_speed() 281 ret = dev_pm_opp_set_rate(ctrl->dev, speed_hz * 4); in qcom_qspi_set_speed() 291 avg_bw_cpu = Bps_to_icc(speed_hz); in qcom_qspi_set_speed() 299 ctrl->last_speed = speed_hz; in qcom_qspi_set_speed() 420 unsigned long speed_hz; in qcom_qspi_transfer_one() local 424 speed_hz = slv->max_speed_hz; in qcom_qspi_transfer_one() 425 if (xfer->speed_hz) in qcom_qspi_transfer_one() 426 speed_hz = xfer->speed_hz; in qcom_qspi_transfer_one() 428 ret = qcom_qspi_set_speed(ctrl, speed_hz); in qcom_qspi_transfer_one()
|
D | spi-sun4i.c | 270 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()
|
D | spi-mpc512x-psc.c | 66 int speed_hz; member 77 cs->speed_hz = (t && t->speed_hz) in mpc512x_psc_spi_transfer_setup() 78 ? t->speed_hz : spi->max_speed_hz; in mpc512x_psc_spi_transfer_setup() 115 speed = cs->speed_hz; in mpc512x_psc_spi_activate_cs() 373 cs->speed_hz = spi->max_speed_hz; in mpc512x_psc_spi_setup()
|
D | spi-cadence.c | 120 u32 speed_hz; member 265 if (xspi->speed_hz != transfer->speed_hz) { in cdns_spi_config_clock_freq() 269 (frequency / (2 << baud_rate_val)) > transfer->speed_hz) in cdns_spi_config_clock_freq() 275 xspi->speed_hz = frequency / (2 << baud_rate_val); in cdns_spi_config_clock_freq() 300 xspi->speed_hz); in cdns_spi_setup_transfer() 663 xspi->speed_hz = ctlr->max_speed_hz; in cdns_spi_probe()
|
D | spi-rspi.c | 184 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 …]
|
D | spi-fsl-lpspi.c | 90 u32 speed_hz; member 304 if (!config.speed_hz) { in fsl_lpspi_set_bitrate() 310 if (config.speed_hz > perclk_rate / 2) { in fsl_lpspi_set_bitrate() 317 scldiv = perclk_rate / config.speed_hz / (1 << prescale) - 2; in fsl_lpspi_set_bitrate() 331 perclk_rate, config.speed_hz, prescale, scldiv); in fsl_lpspi_set_bitrate() 428 fsl_lpspi->config.speed_hz = t->speed_hz; in fsl_lpspi_setup_transfer() 434 if (!fsl_lpspi->config.speed_hz) in fsl_lpspi_setup_transfer() 435 fsl_lpspi->config.speed_hz = spi->max_speed_hz; in fsl_lpspi_setup_transfer() 541 timeout = (8 + 4) * size / fsl_lpspi->config.speed_hz; in fsl_lpspi_calculate_timeout()
|
D | spi-hisi-kunpeng.c | 116 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(host->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(host, chip, transfer->speed_hz); in hisi_spi_transfer_one()
|
D | spi-pic32.c | 105 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()
|
D | spi-lantiq-ssc.c | 182 unsigned int speed_hz; member 434 unsigned int speed_hz = t->speed_hz; in hw_setup_transfer() local 439 speed_hz != spi->speed_hz) { in hw_setup_transfer() 441 hw_setup_speed_hz(spi, speed_hz); in hw_setup_transfer() 445 spi->speed_hz = speed_hz; in hw_setup_transfer() 767 do_div(timeout, spi->speed_hz); in lantiq_ssc_bussy_work() 966 spi->speed_hz = 0; in lantiq_ssc_probe()
|
D | spi-xcomm.c | 78 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()
|
D | spi-bcm63xx-hsspi.c | 140 u32 speed_hz; member 369 bcm63xx_hsspi_set_clk(bs, spi, t->speed_hz); in bcm63xx_hsspi_do_prepend_txrx() 447 reg = DIV_ROUND_UP(2048, DIV_ROUND_UP(bs->speed_hz, hz)); in bcm63xx_hsspi_set_clk() 479 bcm63xx_hsspi_set_clk(bs, spi, t->speed_hz); in bcm63xx_hsspi_do_txrx() 614 if (t->speed_hz > HSSPI_MAX_SYNC_CLOCK) { in bcm63xx_hsspi_do_dummy_cs_txrx() 615 t->speed_hz = HSSPI_MAX_SYNC_CLOCK; in bcm63xx_hsspi_do_dummy_cs_txrx() 618 t->speed_hz); in bcm63xx_hsspi_do_dummy_cs_txrx() 793 bs->speed_hz = rate; in bcm63xx_hsspi_probe()
|
D | spi-uniphier.c | 42 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()
|
/linux-6.6.21/drivers/gpu/drm/ |
D | drm_mipi_dbi.c | 869 tr.speed_hz = mipi_dbi_spi_cmd_max_speed(spi, len); in mipi_dbi_spi1e_transfer() 985 tr.speed_hz = mipi_dbi_spi_cmd_max_speed(spi, len); in mipi_dbi_spi1_transfer() 1034 u32 speed_hz = min_t(u32, MIPI_DBI_MAX_SPI_READ_SPEED, in mipi_dbi_typec1_command_read() local 1038 .speed_hz = speed_hz, in mipi_dbi_typec1_command_read() 1043 .speed_hz = speed_hz, in mipi_dbi_typec1_command_read() 1107 u32 speed_hz = min_t(u32, MIPI_DBI_MAX_SPI_READ_SPEED, in mipi_dbi_typec3_command_read() local 1111 .speed_hz = speed_hz, in mipi_dbi_typec3_command_read() 1115 .speed_hz = speed_hz, in mipi_dbi_typec3_command_read() 1175 u32 speed_hz; in mipi_dbi_typec3_command() local 1185 speed_hz = mipi_dbi_spi_cmd_max_speed(spi, 1); in mipi_dbi_typec3_command() [all …]
|
/linux-6.6.21/drivers/gpu/drm/tiny/ |
D | ili9486.c | 48 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() 86 speed_hz = mipi_dbi_spi_cmd_max_speed(spi, num); in waveshare_command() 87 ret = mipi_dbi_spi_transfer(spi, speed_hz, bpw, data, num); in waveshare_command()
|
D | ili9225.c | 316 u32 speed_hz; in ili9225_dbi_command() local 321 speed_hz = mipi_dbi_spi_cmd_max_speed(spi, 1); in ili9225_dbi_command() 322 ret = mipi_dbi_spi_transfer(spi, speed_hz, 8, cmd, 1); in ili9225_dbi_command() 332 speed_hz = mipi_dbi_spi_cmd_max_speed(spi, num); in ili9225_dbi_command() 333 ret = mipi_dbi_spi_transfer(spi, speed_hz, bpw, par, num); in ili9225_dbi_command()
|
/linux-6.6.21/net/nfc/nci/ |
D | spi.c | 49 t.speed_hz = nspi->xfer_speed_hz; in __nci_spi_send() 192 tx.speed_hz = nspi->xfer_speed_hz; in __nci_spi_read() 199 rx.speed_hz = nspi->xfer_speed_hz; in __nci_spi_read() 224 rx.speed_hz = nspi->xfer_speed_hz; in __nci_spi_read()
|
/linux-6.6.21/drivers/media/dvb-frontends/cxd2880/ |
D | cxd2880_spi_device.c | 67 u32 speed_hz) in cxd2880_spi_device_initialize() argument 89 spi->max_speed_hz = speed_hz; in cxd2880_spi_device_initialize()
|
/linux-6.6.21/sound/soc/codecs/ |
D | wm0010.c | 441 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()
|