linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: dln2: Pass of_node to spi master
@ 2016-04-15 12:10 Crestez Dan Leonard
       [not found] ` <692686e5329a437499fbfb2c235e049979b415a3.1460722225.git.leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  2016-04-18 13:11 ` Applied "spi: dln2: Pass of_node to spi master" to the spi tree Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Crestez Dan Leonard @ 2016-04-15 12:10 UTC (permalink / raw)
  To: Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Octavian Purdila,
	Laurentiu Palcu, Daniel Baluta, Tiberiu Breana,
	Crestez Dan Leonard

This allows defining SPI devices connected to a DLN2 using devicetree.

This already works for i2c because of a similar patch:
3b10db23: i2c: dln2: set the device tree node of the adapter

Signed-off-by: Crestez Dan Leonard <leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/spi/spi-dln2.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c
index 3b7d91d..4e8a862 100644
--- a/drivers/spi/spi-dln2.c
+++ b/drivers/spi/spi-dln2.c
@@ -683,6 +683,7 @@ static int dln2_spi_probe(struct platform_device *pdev)
 	struct spi_master *master;
 	struct dln2_spi *dln2;
 	struct dln2_platform_data *pdata = dev_get_platdata(&pdev->dev);
+	struct device *dev = &pdev->dev;
 	int ret;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(*dln2));
@@ -700,6 +701,8 @@ static int dln2_spi_probe(struct platform_device *pdev)
 	}
 
 	dln2->master = master;
+	dln2->master->dev.parent = dev;
+	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.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] spi: dln2: Pass of_node to spi master
       [not found] ` <692686e5329a437499fbfb2c235e049979b415a3.1460722225.git.leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-04-15 12:19   ` Laurentiu Palcu
  2016-04-15 17:02     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Laurentiu Palcu @ 2016-04-15 12:19 UTC (permalink / raw)
  To: Crestez Dan Leonard
  Cc: Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Octavian Purdila,
	Daniel Baluta, Tiberiu Breana

On Fri, Apr 15, 2016 at 03:10:52PM +0300, Crestez Dan Leonard wrote:
> This allows defining SPI devices connected to a DLN2 using devicetree.
> 
> This already works for i2c because of a similar patch:
> 3b10db23: i2c: dln2: set the device tree node of the adapter
> 
> Signed-off-by: Crestez Dan Leonard <leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

> ---
>  drivers/spi/spi-dln2.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c
> index 3b7d91d..4e8a862 100644
> --- a/drivers/spi/spi-dln2.c
> +++ b/drivers/spi/spi-dln2.c
> @@ -683,6 +683,7 @@ static int dln2_spi_probe(struct platform_device *pdev)
>  	struct spi_master *master;
>  	struct dln2_spi *dln2;
>  	struct dln2_platform_data *pdata = dev_get_platdata(&pdev->dev);
> +	struct device *dev = &pdev->dev;
>  	int ret;
>  
>  	master = spi_alloc_master(&pdev->dev, sizeof(*dln2));
> @@ -700,6 +701,8 @@ static int dln2_spi_probe(struct platform_device *pdev)
>  	}
>  
>  	dln2->master = master;
> +	dln2->master->dev.parent = dev;
> +	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.5.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] spi: dln2: Pass of_node to spi master
  2016-04-15 12:19   ` Laurentiu Palcu
@ 2016-04-15 17:02     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-04-15 17:02 UTC (permalink / raw)
  To: Laurentiu Palcu
  Cc: Crestez Dan Leonard, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Octavian Purdila,
	Daniel Baluta, Tiberiu Breana

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

On Fri, Apr 15, 2016 at 03:19:35PM +0300, Laurentiu Palcu wrote:
> On Fri, Apr 15, 2016 at 03:10:52PM +0300, Crestez Dan Leonard wrote:

> > Signed-off-by: Crestez Dan Leonard <leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Signed-off-by has a specific meaning regarding ownership of patches and
validity of contribution, see SubmittingPatches - I'll take this as an
Acked-by.

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

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

* Applied "spi: dln2: Pass of_node to spi master" to the spi tree
  2016-04-15 12:10 [PATCH] spi: dln2: Pass of_node to spi master Crestez Dan Leonard
       [not found] ` <692686e5329a437499fbfb2c235e049979b415a3.1460722225.git.leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-04-18 13:11 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-04-18 13:11 UTC (permalink / raw)
  To: Crestez Dan Leonard
  Cc: Laurentiu Palcu, Mark Brown, Mark Brown, linux-spi, linux-kernel,
	Octavian Purdila, Laurentiu Palcu, Daniel Baluta, Tiberiu Breana

The patch

   spi: dln2: Pass of_node to spi master

has been applied to the spi tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

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

>From 83835fb07836eac1b35e98b919bf757ff7f77aad Mon Sep 17 00:00:00 2001
From: Crestez Dan Leonard <leonard.crestez@intel.com>
Date: Fri, 15 Apr 2016 15:10:52 +0300
Subject: [PATCH] spi: dln2: Pass of_node to spi master

This allows defining SPI devices connected to a DLN2 using devicetree.

This already works for i2c because of a similar patch:
3b10db23: i2c: dln2: set the device tree node of the adapter

Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Acked-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/spi/spi-dln2.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c
index 3b7d91d94fea..4e8a8629d514 100644
--- a/drivers/spi/spi-dln2.c
+++ b/drivers/spi/spi-dln2.c
@@ -683,6 +683,7 @@ static int dln2_spi_probe(struct platform_device *pdev)
 	struct spi_master *master;
 	struct dln2_spi *dln2;
 	struct dln2_platform_data *pdata = dev_get_platdata(&pdev->dev);
+	struct device *dev = &pdev->dev;
 	int ret;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(*dln2));
@@ -700,6 +701,8 @@ static int dln2_spi_probe(struct platform_device *pdev)
 	}
 
 	dln2->master = master;
+	dln2->master->dev.parent = dev;
+	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.8.0.rc3

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

end of thread, other threads:[~2016-04-18 13:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15 12:10 [PATCH] spi: dln2: Pass of_node to spi master Crestez Dan Leonard
     [not found] ` <692686e5329a437499fbfb2c235e049979b415a3.1460722225.git.leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-04-15 12:19   ` Laurentiu Palcu
2016-04-15 17:02     ` Mark Brown
2016-04-18 13:11 ` Applied "spi: dln2: Pass of_node to spi master" to the spi tree 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).