Lines Matching refs:ctlr
89 struct spi_controller *ctlr = spi_get_drvdata(priv->spi); in spi_mux_complete_cb() local
90 struct spi_message *m = ctlr->cur_msg; in spi_mux_complete_cb()
95 spi_finalize_current_message(ctlr); in spi_mux_complete_cb()
99 static int spi_mux_transfer_one_message(struct spi_controller *ctlr, in spi_mux_transfer_one_message() argument
102 struct spi_mux_priv *priv = spi_controller_get_devdata(ctlr); in spi_mux_transfer_one_message()
128 struct spi_controller *ctlr; in spi_mux_probe() local
132 ctlr = spi_alloc_master(&spi->dev, sizeof(*priv)); in spi_mux_probe()
133 if (!ctlr) in spi_mux_probe()
136 spi_set_drvdata(spi, ctlr); in spi_mux_probe()
137 priv = spi_controller_get_devdata(ctlr); in spi_mux_probe()
144 lockdep_set_subclass(&ctlr->io_mutex, 1); in spi_mux_probe()
145 lockdep_set_subclass(&ctlr->add_lock, 1); in spi_mux_probe()
157 ctlr->mode_bits = spi->controller->mode_bits; in spi_mux_probe()
158 ctlr->flags = spi->controller->flags; in spi_mux_probe()
159 ctlr->transfer_one_message = spi_mux_transfer_one_message; in spi_mux_probe()
160 ctlr->setup = spi_mux_setup; in spi_mux_probe()
161 ctlr->num_chipselect = mux_control_states(priv->mux); in spi_mux_probe()
162 ctlr->bus_num = -1; in spi_mux_probe()
163 ctlr->dev.of_node = spi->dev.of_node; in spi_mux_probe()
164 ctlr->must_async = true; in spi_mux_probe()
166 ret = devm_spi_register_controller(&spi->dev, ctlr); in spi_mux_probe()
173 spi_controller_put(ctlr); in spi_mux_probe()