Skip to contentSkip to conversation

spi: dln2: Propagate firmware node

PATCH In review Andy Shevchenko 3 participants 5 messages Dec 22, 2021 – Dec 23, 2021

Subsystems (3)
lore
Share & tools
lore
author reviewer
#1 lore raw

PATCH v2 2/3 spi: dw: Propagate firmware node

In reply to Andy Shevchenko

Propagate firmware node by using a specific API call, i.e. device_set_node().

---
v2: no changes

 drivers/spi/spi-dw-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-dw-core.c +2 -2
index 934cc7a922e8..ecea471ff42c 100644
@@ -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
author reviewer
#3 lore raw

PATCH v2 3/3 spi: pxa2xx: Propagate firmware node

In reply to Andy Shevchenko

Propagate firmware node by using a specific API call, i.e. device_set_node().

---
v2: no changes

 drivers/spi/spi-pxa2xx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/spi/spi-pxa2xx.c +1 -2
index b3186bd0c2a8..e88f86274eeb 100644
@@ -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

Andy Shevchenko

author reviewer
#0 lore raw

PATCH v2 1/3 spi: dln2: Propagate firmware node

Propagate firmware node by using a specific API call, i.e. device_set_node().

---
v2: included property.h to avoid compilation error (Mark)

 drivers/spi/spi-dln2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-dln2.c +3 -1
index 3ff63ab82f4f..0a1fb2bc9e54 100644
@@ -8,6 +8,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/mfd/dln2.h>
 #include <linux/spi/spi.h>
 #include <linux/pm_runtime.h>
@@ -688,6 +689,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 +702,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
Tested-by Acked-by on v2 2/3
#2 lore raw

Re: [PATCH v2 2/3] spi: dw: Propagate firmware node

In reply to Andy Shevchenko
Quoted 1 line · Andy Shevchenko

Propagate firmware node by using a specific API call, i.e. device_set_node().

-Sergey

Quoted 32 lines

---
v2: no changes

 drivers/spi/spi-dw-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-dw-core.c +2 -2
index 934cc7a922e8..ecea471ff42c 100644
@@ -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
maintainer
#4 lore raw
In reply to Andy Shevchenko
Quoted 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: 12baee68b2df6847f9a26ee82f30aa5f52c6d0d2

All 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