linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurentiu Palcu <laurentiu.palcu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Crestez Dan Leonard
	<leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Octavian Purdila
	<octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Daniel Baluta
	<daniel.baluta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Tiberiu Breana
	<tiberiu.a.breana-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] spi: dln2: Pass of_node to spi master
Date: Fri, 15 Apr 2016 15:19:35 +0300	[thread overview]
Message-ID: <20160415121935.GD2058@lpalcu-desk> (raw)
In-Reply-To: <692686e5329a437499fbfb2c235e049979b415a3.1460722225.git.leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

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

  parent reply	other threads:[~2016-04-15 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160415121935.GD2058@lpalcu-desk \
    --to=laurentiu.palcu-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=daniel.baluta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=leonard.crestez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=tiberiu.a.breana-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).