Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: bcm53xx: set of_node to let DT specify device(s)

Setting of_node of master's dev seems to be a common way of letting it
work nicely with DT. This allows specifying device there instead of
hardcoding one in the driver code.

This was successfully tested with commit 1b47b98acce2 ("ARM: BCM5301X:
Add DT entry for SPI controller and NOR flash")

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Rafał Miłecki and committed by
Mark Brown
78d759da fafd6794

+1 -7
+1 -7
drivers/spi/spi-bcm53xx.c
··· 275 275 * BCMA 276 276 **************************************************/ 277 277 278 - static struct spi_board_info bcm53xx_info = { 279 - .modalias = "bcm53xxspiflash", 280 - }; 281 - 282 278 static const struct bcma_device_id bcm53xxspi_bcma_tbl[] = { 283 279 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_QSPI, BCMA_ANY_REV, BCMA_ANY_CLASS), 284 280 {}, ··· 307 311 b53spi->bspi = true; 308 312 bcm53xxspi_disable_bspi(b53spi); 309 313 314 + master->dev.of_node = dev->of_node; 310 315 master->transfer_one = bcm53xxspi_transfer_one; 311 316 if (b53spi->mmio_base) 312 317 master->spi_flash_read = bcm53xxspi_flash_read; ··· 320 323 bcma_set_drvdata(core, NULL); 321 324 return err; 322 325 } 323 - 324 - /* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */ 325 - spi_new_device(master, &bcm53xx_info); 326 326 327 327 return 0; 328 328 }