Lines Matching refs:bus
45 struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, in spi_setup_slave() argument
53 if (!spi_cs_is_valid(bus, cs)) in spi_setup_slave()
56 switch (bus) { in spi_setup_slave()
80 scbr = (get_spi_clk_rate(bus) + max_hz - 1) / max_hz; in spi_setup_slave()
94 as = spi_alloc_slave(struct atmel_spi_slave, bus, cs); in spi_setup_slave()
246 struct udevice *bus = dev_get_parent(dev); in atmel_spi_claim_bus() local
247 struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus); in atmel_spi_claim_bus()
248 struct atmel_spi_priv *priv = dev_get_priv(bus); in atmel_spi_claim_bus()
286 struct udevice *bus = dev_get_parent(dev); in atmel_spi_release_bus() local
287 struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus); in atmel_spi_release_bus()
297 struct udevice *bus = dev_get_parent(dev); in atmel_spi_cs_activate() local
298 struct atmel_spi_priv *priv = dev_get_priv(bus); in atmel_spi_cs_activate()
312 struct udevice *bus = dev_get_parent(dev); in atmel_spi_cs_deactivate() local
313 struct atmel_spi_priv *priv = dev_get_priv(bus); in atmel_spi_cs_deactivate()
327 struct udevice *bus = dev_get_parent(dev); in atmel_spi_xfer() local
328 struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus); in atmel_spi_xfer()
412 static int atmel_spi_set_speed(struct udevice *bus, uint speed) in atmel_spi_set_speed() argument
414 struct atmel_spi_priv *priv = dev_get_priv(bus); in atmel_spi_set_speed()
421 static int atmel_spi_set_mode(struct udevice *bus, uint mode) in atmel_spi_set_mode() argument
423 struct atmel_spi_priv *priv = dev_get_priv(bus); in atmel_spi_set_mode()
442 static int atmel_spi_enable_clk(struct udevice *bus) in atmel_spi_enable_clk() argument
444 struct atmel_spi_priv *priv = dev_get_priv(bus); in atmel_spi_enable_clk()
449 ret = clk_get_by_index(bus, 0, &clk); in atmel_spi_enable_clk()
468 static int atmel_spi_probe(struct udevice *bus) in atmel_spi_probe() argument
470 struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus); in atmel_spi_probe()
473 ret = atmel_spi_enable_clk(bus); in atmel_spi_probe()
477 bus_plat->regs = (struct at91_spi *)devfdt_get_addr(bus); in atmel_spi_probe()
480 struct atmel_spi_priv *priv = dev_get_priv(bus); in atmel_spi_probe()
483 ret = gpio_request_list_by_name(bus, "cs-gpios", priv->cs_gpios, in atmel_spi_probe()
486 pr_err("Can't get %s gpios! Error: %d", bus->name, ret); in atmel_spi_probe()