public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Stickel <ms@mycable.de>
To: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <robherring2@gmail.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Matt Porter <matt.porter@linaro.org>,
	Koen Kooi <koen@dominion.thruhere.net>,
	Alison Chaiken <Alison_Chaiken@mentor.com>,
	Dinh Nguyen <dinh.linux@gmail.com>, Jan Lubbe <jluebbe@lasnet.de>,
	Alexander Sverdlin <alexander.sverdlin@nsn.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Dirk Behme <dirk.behme@gmail.com>,
	Alan Tull <delicious.quinoa@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Michael Bohan <mbohan@codeaurora.org>,
	Ionut Nicu <ioan.nicu.ext@nsn.com>,
	Michal Simek <monstr@monstr.eu>,
	Matt Ranostay <mranostay@gmail.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Pete Popov <pete.popov@konsulko.com>,
	Dan Malek <dan.malek@konsulko.com>,
	Georgi Vlaev <georgi.vlaev@konsulko.com>
Subject: Re: [PATCH v3 6/7] OF: spi: Add overlay bus handler
Date: Thu, 20 Mar 2014 11:51:10 +0100	[thread overview]
Message-ID: <532AC81E.90303@mycable.de> (raw)
In-Reply-To: <1395179766-31575-7-git-send-email-pantelis.antoniou@konsulko.com>

Am 18.03.2014 22:56, schrieb Pantelis Antoniou:
> Add the bus handler registration needed for performing overlays
> containing spi devices.
> 
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> ---
>  drivers/spi/spi.c | 345 ++++++++++++++++++++++++++++++++++++++----------------
>  1 file changed, 242 insertions(+), 103 deletions(-)
> 

nc is not set in of_register_spi_device and causes an Oops.
Using nc = node works.
What is the purpose of nc?

> +of_register_spi_device(struct spi_master *master, struct device_node *node)
> +{
> +	struct spi_device *spi;
> +	struct device_node *nc;
> +	int err;
> +	u32 value;
> +
> +	/* Alloc an spi_device */
> +	spi = spi_alloc_device(master);
> +	if (!spi) {
> +		dev_err(&master->dev, "spi_device alloc error for %s\n",
> +			nc->full_name);
> +		err = -ENOMEM;
> +		goto err_out;
> +	}
> +
> +	/* Select device driver */
> +	err = of_modalias_node(nc, spi->modalias,
> +				sizeof(spi->modalias));
> +	if (err) {
> +		dev_err(&master->dev, "cannot find modalias for %s\n",
> +			nc->full_name);
> +		goto err_out;
> +	}




  reply	other threads:[~2014-03-20 10:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 21:55 [PATCH v3 0/7] Introducing (yet again) Device Tree Overlays Pantelis Antoniou
2014-03-18 21:56 ` [PATCH v3 1/7] OF: Introduce Device Tree resolve support Pantelis Antoniou
2014-03-18 21:56 ` [PATCH v3 2/7] OF: Introduce DT overlay support Pantelis Antoniou
2014-03-28 14:51   ` delicious quinoa
2014-03-28 18:54   ` delicious quinoa
2014-03-18 21:56 ` [PATCH v3 3/7] OF: DT-Overlay configfs interface Pantelis Antoniou
2014-03-21 13:39   ` Rob Herring
2014-03-21 13:56     ` Sebastian Hesselbarth
2014-03-18 21:56 ` [PATCH v3 4/7] OF: platform: Add overlay bus handler Pantelis Antoniou
2014-03-18 21:56 ` [PATCH v3 5/7] OF: i2c: " Pantelis Antoniou
2014-03-18 21:56 ` [PATCH v3 6/7] OF: spi: " Pantelis Antoniou
2014-03-20 10:51   ` Michael Stickel [this message]
2014-03-18 21:56 ` [PATCH v3 7/7] of: i2c: Export single device registration method Pantelis Antoniou
2014-03-28 18:27 ` [PATCH v3 0/7] Introducing (yet again) Device Tree Overlays delicious quinoa
2014-04-03 20:40   ` delicious quinoa
2014-04-16 21:23     ` delicious quinoa
2014-04-16 21:33       ` Rob Herring
2014-04-17 15:46         ` delicious quinoa
2014-04-17 16:12   ` Pantelis Antoniou
2014-04-18 16:54     ` delicious quinoa

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=532AC81E.90303@mycable.de \
    --to=ms@mycable.de \
    --cc=Alison_Chaiken@mentor.com \
    --cc=alexander.sverdlin@nsn.com \
    --cc=dan.malek@konsulko.com \
    --cc=delicious.quinoa@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinh.linux@gmail.com \
    --cc=dirk.behme@gmail.com \
    --cc=georgi.vlaev@konsulko.com \
    --cc=grant.likely@secretlab.ca \
    --cc=ioan.nicu.ext@nsn.com \
    --cc=jluebbe@lasnet.de \
    --cc=koen@dominion.thruhere.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=matt.porter@linaro.org \
    --cc=mbohan@codeaurora.org \
    --cc=monstr@monstr.eu \
    --cc=mranostay@gmail.com \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=pete.popov@konsulko.com \
    --cc=robherring2@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=swarren@wwwdotorg.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