Skip to contentSkip to conversation

spi: dw: announce driver probe

PATCH In review Ben Dooks 2 participants 2 messages May 31, 2023 SPI

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 spi: dw: announce driver probe

From: Ben Dooks <[email protected]>

It is useful to know the driver probed, so print some basic info when it does, such as the spi bus name, irq, etc.

---
 drivers/spi/spi-dw-core.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/spi/spi-dw-core.c +3 -0
index 071a7604a8ab..8e8a0d063519 100644
@@ -958,6 +958,9 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
 		goto err_dma_exit;
 	}
 
+	dev_info(dev, "%s: irq %d, %d fifo, max freq %u",
+		 dev_name(&master->dev), dws->irq, dws->fifo_len,
+		 dws->max_freq);
 	dw_spi_debugfs_init(dws);
 	return 0;
 
Signature · 1 line
2.39.2
maintainer
#1 lore raw
Quoted 2 lines · Ben Dooks

It is useful to know the driver probed, so print some basic info when it does, such as the spi bus name, irq, etc.

No, we don't want every driver spamming the logs at probe - apart from anything else this slows down boot. There's already some standard logging from the driver core that can be turned on if needed for debug purposes. If there's things being enumerated from the hardware it can be useful to record those but that's chip revisions and so on rather than things like interrupt numbers.