spi: dln2: Propagate firmware node
Subsystems (3)
Andy Shevchenko
reviewerPATCH 1/3 spi: dln2: Propagate firmware node
Propagate firmware node by using a specific API call, i.e. device_set_node().
--- drivers/spi/spi-dln2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/spi-dln2.c +2 -1
@@ -688,6 +688,8 @@ static int dln2_spi_probe(struct platform_device *pdev)if (!master)return -ENOMEM ; +device_set_node (&master->dev,dev_fwnode (dev)); +platform_set_drvdata (pdev, master); dln2 =spi_master_get_devdata (master);
@@ -699,7 +701,6 @@ static int dln2_spi_probe(struct platform_device *pdev) } dln2->master = master; - dln2->master->dev.of_node = dev->of_node; dln2->pdev = pdev; dln2->port = pdata->port;/* cs/mode can never be 0xff, so the first transfer will set them */
Signature · 1 line
2.34.1
Andy Shevchenko
reviewerPATCH 2/3 spi: dw: Propagate firmware node
Propagate firmware node by using a specific API call, i.e. device_set_node().
--- drivers/spi/spi-dw-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-dw-core.c +2 -2
@@ -895,6 +895,8 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)if (!master)return -ENOMEM ; +device_set_node (&master->dev,dev_fwnode (dev)); + dws->master = master; dws->dma_addr = (dma_addr_t)(dws->paddr +DW_SPI_DR );
@@ -931,8 +933,6 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)if (dws->mem_ops.exec_op) master->mem_ops = &dws->mem_ops; master->max_speed_hz = dws->max_freq; - master->dev.of_node = dev->of_node; - master->dev.fwnode = dev->fwnode; master->flags =SPI_MASTER_GPIO_SS ; master->auto_runtime_pm = true;
Signature · 1 line
2.34.1
Andy Shevchenko
reviewerPATCH 3/3 spi: pxa2xx: Propagate firmware node
In reply to Andy ShevchenkoPropagate firmware node by using a specific API call, i.e. device_set_node().
--- drivers/spi/spi-pxa2xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/spi/spi-pxa2xx.c +1 -2
@@ -1664,8 +1664,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) drv_data->controller_info = platform_info; drv_data->ssp = ssp; - controller->dev.of_node = dev->of_node; - controller->dev.fwnode = dev->fwnode; +device_set_node (&controller->dev,dev_fwnode (dev));/* The spi->mode bits understood by this driver: */ controller->mode_bits =SPI_CPOL |SPI_CPHA |SPI_CS_HIGH |SPI_LOOP ;
Signature · 1 line
2.34.1
Mark Brown
maintainerQuoted 1 line · Andy Shevchenko
Propagate firmware node by using a specific API call, i.e.
device_set_node().
This breaks at least an x86 allmodconfig build:
/mnt/kernel/drivers/spi/spi-dln2.c: In function 'dln2_spi_probe':/mnt/kernel/drivers/spi/spi-dln2.c:691:32: error: implicit declaration of function 'dev_fwnode'; did you mean 'dev_of_node'? [-Werror=implicit-function-declaration]
691 | device_set_node(&master->dev, dev_fwnode(dev));
| ^~~~~~~~~~
| dev_of_node
/mnt/kernel/drivers/spi/spi-dln2.c:691:32: error: passing argument 2 of 'device_set_node' makes pointer from integer without a cast [-Werror=int-conversion]
691 | device_set_node(&master->dev, dev_fwnode(dev));
| ^~~~~~~~~~~~~~~
| |
| int
In file included from /mnt/kernel/include/linux/platform_device.h:13,
from /mnt/kernel/drivers/spi/spi-dln2.c:10:
/mnt/kernel/include/linux/device.h:854:64: note: expected 'struct fwnode_handle *' but argument is of type 'int'
854 | void device_set_node(struct device *dev, struct fwnode_handle *fwnode);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~cc1: all warnings being treated as errors
Andy Shevchenko
reviewerQuoted 4 lines · Mark Brown
Quoted 1 line · Andy Shevchenko
Propagate firmware node by using a specific API call, i.e.
device_set_node().cc1: all warnings being treated as errors
Oops, I was in full impression that I have it enabled, but no, the other two only. I'll fix this ASAP, sorry for that, I have added the configuration option.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Mark Brown
maintainerQuoted 3 lines · Andy Shevchenko
Propagate firmware node by using a specific API call, i.e.
device_set_node().
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/3] spi: dln2: Propagate firmware node
commit: e6609c26b3ab71aa3ef2f7f9524a066a863a7f18
[2/3] spi: dw: Propagate firmware node
commit: 27b6965ccb72e658eb2235f564a04d2775c956cf
[3/3] spi: pxa2xx: Propagate firmware node
commit: 12baee68b2df6847f9a26ee82f30aa5f52c6d0d2All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark