Lines Matching refs:dev

490 		dev_err(&rspi->ctlr->dev, "transmit timeout\n");  in rspi_data_out()
504 dev_err(&rspi->ctlr->dev, "receive timeout\n"); in rspi_data_in()
622 dev_err(&rspi->ctlr->dev, "DMA timeout\n"); in rspi_dma_transfer()
645 dev_warn_once(&rspi->ctlr->dev, in rspi_dma_transfer()
767 dev_err(&rspi->ctlr->dev, "transmit timeout\n"); in qspi_trigger_transfer_out_in()
775 dev_err(&rspi->ctlr->dev, "receive timeout\n"); in qspi_trigger_transfer_out_in()
819 dev_err(&rspi->ctlr->dev, "transmit timeout\n"); in qspi_transfer_out()
851 dev_err(&rspi->ctlr->dev, "receive timeout\n"); in qspi_transfer_in()
928 dev_err(&msg->spi->dev, in qspi_setup_sequencer()
956 pm_runtime_get_sync(&rspi->pdev->dev); in rspi_setup()
967 pm_runtime_put(&rspi->pdev->dev); in rspi_setup()
1093 static struct dma_chan *rspi_request_dma_chan(struct device *dev, in rspi_request_dma_chan() argument
1107 (void *)(unsigned long)id, dev, in rspi_request_dma_chan()
1110 dev_warn(dev, "dma_request_slave_channel_compat failed\n"); in rspi_request_dma_chan()
1123 dev_warn(dev, "dmaengine_slave_config failed %d\n", ret); in rspi_request_dma_chan()
1131 static int rspi_request_dma(struct device *dev, struct spi_controller *ctlr, in rspi_request_dma() argument
1134 const struct rspi_plat_data *rspi_pd = dev_get_platdata(dev); in rspi_request_dma()
1137 if (dev->of_node) { in rspi_request_dma()
1149 ctlr->dma_tx = rspi_request_dma_chan(dev, DMA_MEM_TO_DEV, dma_tx_id, in rspi_request_dma()
1154 ctlr->dma_rx = rspi_request_dma_chan(dev, DMA_DEV_TO_MEM, dma_rx_id, in rspi_request_dma()
1163 dev_info(dev, "DMA available"); in rspi_request_dma()
1180 pm_runtime_disable(&pdev->dev); in rspi_remove()
1233 static int rspi_parse_dt(struct device *dev, struct spi_controller *ctlr) in rspi_parse_dt() argument
1240 error = of_property_read_u32(dev->of_node, "num-cs", &num_cs); in rspi_parse_dt()
1242 dev_err(dev, "of_property_read_u32 num-cs failed %d\n", error); in rspi_parse_dt()
1248 rstc = devm_reset_control_get_optional_exclusive(dev, NULL); in rspi_parse_dt()
1250 return dev_err_probe(dev, PTR_ERR(rstc), in rspi_parse_dt()
1255 dev_err(dev, "failed to deassert reset %d\n", error); in rspi_parse_dt()
1259 error = devm_add_action_or_reset(dev, rspi_reset_control_assert, rstc); in rspi_parse_dt()
1261 dev_err(dev, "failed to register assert devm action, %d\n", error); in rspi_parse_dt()
1269 static inline int rspi_parse_dt(struct device *dev, struct spi_controller *ctlr) in rspi_parse_dt() argument
1275 static int rspi_request_irq(struct device *dev, unsigned int irq, in rspi_request_irq() argument
1279 const char *name = devm_kasprintf(dev, GFP_KERNEL, "%s:%s", in rspi_request_irq()
1280 dev_name(dev), suffix); in rspi_request_irq()
1284 return devm_request_irq(dev, irq, handler, 0, name, dev_id); in rspi_request_irq()
1297 ctlr = spi_alloc_host(&pdev->dev, sizeof(struct rspi_data)); in rspi_probe()
1301 ops = of_device_get_match_data(&pdev->dev); in rspi_probe()
1303 ret = rspi_parse_dt(&pdev->dev, ctlr); in rspi_probe()
1308 rspi_pd = dev_get_platdata(&pdev->dev); in rspi_probe()
1326 rspi->clk = devm_clk_get(&pdev->dev, NULL); in rspi_probe()
1328 dev_err(&pdev->dev, "cannot get clock\n"); in rspi_probe()
1334 pm_runtime_enable(&pdev->dev); in rspi_probe()
1351 ctlr->dev.of_node = pdev->dev.of_node; in rspi_probe()
1371 ret = rspi_request_irq(&pdev->dev, rspi->rx_irq, rspi_irq_mux, in rspi_probe()
1375 ret = rspi_request_irq(&pdev->dev, rspi->rx_irq, rspi_irq_rx, in rspi_probe()
1378 ret = rspi_request_irq(&pdev->dev, rspi->tx_irq, in rspi_probe()
1382 dev_err(&pdev->dev, "request_irq error\n"); in rspi_probe()
1386 ret = rspi_request_dma(&pdev->dev, ctlr, res); in rspi_probe()
1388 dev_warn(&pdev->dev, "DMA not available, using PIO\n"); in rspi_probe()
1390 ret = devm_spi_register_controller(&pdev->dev, ctlr); in rspi_probe()
1392 dev_err(&pdev->dev, "devm_spi_register_controller error.\n"); in rspi_probe()
1396 dev_info(&pdev->dev, "probed\n"); in rspi_probe()
1403 pm_runtime_disable(&pdev->dev); in rspi_probe()
1418 static int rspi_suspend(struct device *dev) in rspi_suspend() argument
1420 struct rspi_data *rspi = dev_get_drvdata(dev); in rspi_suspend()
1425 static int rspi_resume(struct device *dev) in rspi_resume() argument
1427 struct rspi_data *rspi = dev_get_drvdata(dev); in rspi_resume()