Lines Matching refs:speed
18 static int spi_set_speed_mode(struct udevice *bus, int speed, int mode) in spi_set_speed_mode() argument
25 ret = ops->set_speed(bus, speed); in spi_set_speed_mode()
51 int speed; in dm_spi_claim_bus() local
53 speed = slave->max_hz; in dm_spi_claim_bus()
55 if (speed) in dm_spi_claim_bus()
56 speed = min(speed, (int)spi->max_hz); in dm_spi_claim_bus()
58 speed = spi->max_hz; in dm_spi_claim_bus()
60 if (!speed) in dm_spi_claim_bus()
61 speed = 100000; in dm_spi_claim_bus()
62 if (speed != slave->speed) { in dm_spi_claim_bus()
63 int ret = spi_set_speed_mode(bus, speed, slave->mode); in dm_spi_claim_bus()
67 slave->speed = speed; in dm_spi_claim_bus()
267 int spi_get_bus_and_cs(int busnum, int cs, int speed, int mode, in spi_get_bus_and_cs() argument
303 plat->max_hz = speed; in spi_get_bus_and_cs()
323 if (!speed) { in spi_get_bus_and_cs()
324 speed = plat->max_hz; in spi_get_bus_and_cs()
327 ret = spi_set_speed_mode(bus, speed, mode); in spi_get_bus_and_cs()
350 unsigned int speed, unsigned int mode) in spi_setup_slave() argument
356 ret = spi_get_bus_and_cs(busnum, cs, speed, mode, NULL, 0, &dev, in spi_setup_slave()