linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/3] spi: dln2: Propagate firmware node
@ 2021-12-22 13:54 Andy Shevchenko
  2021-12-22 13:54 ` [PATCH v1 2/3] spi: dw: " Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Andy Shevchenko @ 2021-12-22 13:54 UTC (permalink / raw)
  To: Andy Shevchenko, Mark Brown, Serge Semin, linux-spi,
	linux-kernel, linux-arm-kernel
  Cc: Serge Semin, Daniel Mack, Haojian Zhuang, Robert Jarzmik

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

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-dln2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c
index 3ff63ab82f4f..ac83b406151d 100644
--- a/drivers/spi/spi-dln2.c
+++ b/drivers/spi/spi-dln2.c
@@ -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 */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v1 2/3] spi: dw: Propagate firmware node
  2021-12-22 13:54 [PATCH v1 1/3] spi: dln2: Propagate firmware node Andy Shevchenko
@ 2021-12-22 13:54 ` Andy Shevchenko
  2021-12-22 13:54 ` [PATCH v1 3/3] spi: pxa2xx: " Andy Shevchenko
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2021-12-22 13:54 UTC (permalink / raw)
  To: Andy Shevchenko, Mark Brown, Serge Semin, linux-spi,
	linux-kernel, linux-arm-kernel
  Cc: Serge Semin, Daniel Mack, Haojian Zhuang, Robert Jarzmik

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

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-dw-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c
index 934cc7a922e8..ecea471ff42c 100644
--- a/drivers/spi/spi-dw-core.c
+++ b/drivers/spi/spi-dw-core.c
@@ -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;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v1 3/3] spi: pxa2xx: Propagate firmware node
  2021-12-22 13:54 [PATCH v1 1/3] spi: dln2: Propagate firmware node Andy Shevchenko
  2021-12-22 13:54 ` [PATCH v1 2/3] spi: dw: " Andy Shevchenko
@ 2021-12-22 13:54 ` Andy Shevchenko
  2021-12-22 15:31 ` [PATCH v1 1/3] spi: dln2: " Mark Brown
  2021-12-23 17:17 ` Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2021-12-22 13:54 UTC (permalink / raw)
  To: Andy Shevchenko, Mark Brown, Serge Semin, linux-spi,
	linux-kernel, linux-arm-kernel
  Cc: Serge Semin, Daniel Mack, Haojian Zhuang, Robert Jarzmik

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

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-pxa2xx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index b3186bd0c2a8..e88f86274eeb 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/3] spi: dln2: Propagate firmware node
  2021-12-22 13:54 [PATCH v1 1/3] spi: dln2: Propagate firmware node Andy Shevchenko
  2021-12-22 13:54 ` [PATCH v1 2/3] spi: dw: " Andy Shevchenko
  2021-12-22 13:54 ` [PATCH v1 3/3] spi: pxa2xx: " Andy Shevchenko
@ 2021-12-22 15:31 ` Mark Brown
  2021-12-22 15:51   ` Andy Shevchenko
  2021-12-23 17:17 ` Mark Brown
  3 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2021-12-22 15:31 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Serge Semin, linux-spi, linux-kernel, linux-arm-kernel,
	Serge Semin, Daniel Mack, Haojian Zhuang, Robert Jarzmik

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

On Wed, Dec 22, 2021 at 03:54:21PM +0200, Andy Shevchenko wrote:
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/3] spi: dln2: Propagate firmware node
  2021-12-22 15:31 ` [PATCH v1 1/3] spi: dln2: " Mark Brown
@ 2021-12-22 15:51   ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2021-12-22 15:51 UTC (permalink / raw)
  To: Mark Brown
  Cc: Serge Semin, linux-spi, linux-kernel, linux-arm-kernel,
	Serge Semin, Daniel Mack, Haojian Zhuang, Robert Jarzmik

On Wed, Dec 22, 2021 at 03:31:27PM +0000, Mark Brown wrote:
> On Wed, Dec 22, 2021 at 03:54:21PM +0200, Andy Shevchenko wrote:
> > 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.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/3] spi: dln2: Propagate firmware node
  2021-12-22 13:54 [PATCH v1 1/3] spi: dln2: Propagate firmware node Andy Shevchenko
                   ` (2 preceding siblings ...)
  2021-12-22 15:31 ` [PATCH v1 1/3] spi: dln2: " Mark Brown
@ 2021-12-23 17:17 ` Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-12-23 17:17 UTC (permalink / raw)
  To: Serge Semin, linux-kernel, Andy Shevchenko, linux-spi, linux-arm-kernel
  Cc: Robert Jarzmik, Haojian Zhuang, Serge Semin, Daniel Mack

On Wed, 22 Dec 2021 15:54:21 +0200, Andy Shevchenko wrote:
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-23 17:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 13:54 [PATCH v1 1/3] spi: dln2: Propagate firmware node Andy Shevchenko
2021-12-22 13:54 ` [PATCH v1 2/3] spi: dw: " Andy Shevchenko
2021-12-22 13:54 ` [PATCH v1 3/3] spi: pxa2xx: " Andy Shevchenko
2021-12-22 15:31 ` [PATCH v1 1/3] spi: dln2: " Mark Brown
2021-12-22 15:51   ` Andy Shevchenko
2021-12-23 17:17 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).