Home | History | Annotate | Download | only in fdt

Lines Matching defs:spi

70 #include <dev/spi/spi_calls.h>
86 struct fdtbus_spi_controller *spi;
88 spi = kmem_alloc(sizeof(*spi), KM_SLEEP);
89 spi->spi_dev = dev;
90 spi->spi_controller = controller;
92 LIST_INSERT_HEAD(&fdtbus_spi_controllers, spi, spi_next);
101 struct fdtbus_spi_controller *spi;
103 LIST_FOREACH(spi, &fdtbus_spi_controllers, spi_next) {
105 devhandle_to_of(device_handle(spi->spi_dev))) {
106 return spi->spi_controller;
199 if (of_hasprop(node, "spi-cpha")) {
202 if (of_hasprop(node, "spi-cpol")) {
206 if (of_getprop_uint32(node, "spi-max-frequency", &val32) == 0) {
210 if (of_hasprop(node, "spi-3wire")) {
213 if (of_hasprop(node, "spi-cs-high")) {
216 if (of_hasprop(node, "spi-lsb-first")) {
220 if (of_getprop_uint32(node, "spi-cs-setup-delay-ns", &val32) == 0) {
223 if (of_getprop_uint32(node, "spi-cs-hold-delay-ns", &val32) == 0) {
226 if (of_getprop_uint32(node, "spi-cs-inactive-delay-ns", &val32) == 0) {
231 if (of_getprop_uint32(node, "spi-rx-bus-width", &val32) == 0) {
234 "device tree error: \"spi-rx-bus-width\" "
241 if (of_getprop_uint32(node, "spi-rx-delay-us", &val32) == 0) {
246 * XXX Yes, the Device Tree bindings for SPI peripherals really
247 * leave off the spi- prefix for this particular property.
254 if (of_getprop_uint32(node, "spi-tx-bus-width", &val32) == 0) {
257 "device tree error: \"spi-tx-bus-width\" "
264 if (of_getprop_uint32(node, "spi-tx-delay-us", &val32) == 0) {