|
PebbleOS v4.43.0-108-gde23235b2
|
Bus driver operations. More...
#include <spi.h>
Data Fields | |
| int(* | init )(const struct pbl_spi_bus *bus) |
| Configure the controller, leaving it disabled. | |
| int(* | configure )(const struct pbl_spi_bus *bus, const struct pbl_spi_dev *dev) |
Set the controller up for dev: the highest supported clock frequency up to dev->max_hz and the mode. | |
| void(* | enable )(const struct pbl_spi_bus *bus) |
| Power the controller up. | |
| void(* | disable )(const struct pbl_spi_bus *bus) |
| Power the controller down. | |
| int(* | start )(const struct pbl_spi_bus *bus, const struct pbl_spi_xfer *xfer) |
| Start a transfer. | |
Bus driver operations.
Called with the bus lock held. The class layer owns locking, power, chip selects and the sequence of transfers; the driver moves one transfer over the wire and reports its outcome with pbl_spi_bus_complete().
| int(* pbl_spi_bus_ops::configure) (const struct pbl_spi_bus *bus, const struct pbl_spi_dev *dev) |
Set the controller up for dev: the highest supported clock frequency up to dev->max_hz and the mode.
Called before enable(). Returns 0 or a negative errno.
| void(* pbl_spi_bus_ops::disable) (const struct pbl_spi_bus *bus) |
Power the controller down.
May be called from the controller's interrupt.
| void(* pbl_spi_bus_ops::enable) (const struct pbl_spi_bus *bus) |
Power the controller up.
| int(* pbl_spi_bus_ops::init) (const struct pbl_spi_bus *bus) |
Configure the controller, leaving it disabled.
Returns 0 or a negative errno.
| int(* pbl_spi_bus_ops::start) (const struct pbl_spi_bus *bus, const struct pbl_spi_xfer *xfer) |
Start a transfer.
Returns 0 if pbl_spi_bus_complete() will be called, or a negative errno. May be called from the controller's interrupt.