Lines Matching refs:plat

55     if (plat == NULL) {  in mraa_spi_init()
63 if (plat->spi_bus_count == 0) { in mraa_spi_init()
67 if (plat->spi_bus_count == 1) { in mraa_spi_init()
68 bus = plat->def_spi_bus; in mraa_spi_init()
70 if (bus >= plat->spi_bus_count) { in mraa_spi_init()
74 if (plat->adv_func->spi_init_pre != NULL) { in mraa_spi_init()
75 if (plat->adv_func->spi_init_pre(bus) != MRAA_SUCCESS) { in mraa_spi_init()
80 if (!plat->no_bus_mux) { in mraa_spi_init()
81 int pos = plat->spi_bus[bus].sclk; in mraa_spi_init()
82 if (plat->pins[pos].spi.mux_total > 0) { in mraa_spi_init()
83 if (mraa_setup_mux_mapped(plat->pins[pos].spi) != MRAA_SUCCESS) { in mraa_spi_init()
89 pos = plat->spi_bus[bus].mosi; in mraa_spi_init()
90 if (plat->pins[pos].spi.mux_total > 0) { in mraa_spi_init()
91 if (mraa_setup_mux_mapped(plat->pins[pos].spi) != MRAA_SUCCESS) { in mraa_spi_init()
97 pos = plat->spi_bus[bus].miso; in mraa_spi_init()
98 if (plat->pins[pos].spi.mux_total > 0) { in mraa_spi_init()
99 if (mraa_setup_mux_mapped(plat->pins[pos].spi) != MRAA_SUCCESS) { in mraa_spi_init()
105 pos = plat->spi_bus[bus].cs; in mraa_spi_init()
106 if (plat->pins[pos].spi.mux_total > 0) { in mraa_spi_init()
107 if (mraa_setup_mux_mapped(plat->pins[pos].spi) != MRAA_SUCCESS) { in mraa_spi_init()
113 mraa_spi_context dev = mraa_spi_init_raw(plat->spi_bus[bus].bus_id, plat->spi_bus[bus].slave_s); in mraa_spi_init()
115 if (plat->adv_func->spi_init_post != NULL) { in mraa_spi_init()
116 mraa_result_t ret = plat->adv_func->spi_init_post(dev); in mraa_spi_init()
129 mraa_spi_context dev = mraa_spi_init_internal(plat == NULL ? NULL : plat->adv_func); in mraa_spi_init_raw()