From: Joakim Tjernlund <Joakim.Tjernlund-27rvihrghlNWk0Htik3J/w@public.gmane.org>
To: "linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] spi: spi-fsl-spi: Add OF bus-num property
Date: Fri, 13 Jan 2017 15:41:24 +0000 [thread overview]
Message-ID: <1484322082.4044.0.camel@infinera.com> (raw)
In-Reply-To: <20161219120942.29022-1-joakim.tjernlund-27rvihrghlNWk0Htik3J/w@public.gmane.org>
On Mon, 2016-12-19 at 13:09 +0100, Joakim Tjernlund wrote:
> Allow OF to specify bus enumeration. This uses the same property
> as spi-fsl-dspi.
>
> Signed-off-by: Joakim Tjernlund <joakim.tjernlund-27rvihrghlNWk0Htik3J/w@public.gmane.org>
> ---
Ping?
> drivers/spi/spi-fsl-lib.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-fsl-lib.c b/drivers/spi/spi-fsl-lib.c
> index cb35d2f..3b06513 100644
> --- a/drivers/spi/spi-fsl-lib.c
> +++ b/drivers/spi/spi-fsl-lib.c
> @@ -140,7 +140,7 @@ int of_mpc8xxx_spi_probe(struct platform_device *ofdev)
> struct mpc8xxx_spi_probe_info *pinfo;
> struct fsl_spi_platform_data *pdata;
> const void *prop;
> - int ret = -ENOMEM;
> + int ret = -ENOMEM, bus_num;
>
> pinfo = devm_kzalloc(&ofdev->dev, sizeof(*pinfo), GFP_KERNEL);
> if (!pinfo)
> @@ -151,7 +151,9 @@ int of_mpc8xxx_spi_probe(struct platform_device *ofdev)
>
> /* Allocate bus num dynamically. */
> pdata->bus_num = -1;
> -
> + ret = of_property_read_u32(np, "bus-num", &bus_num);
> + if (ret >= 0)
> + pdata->bus_num = bus_num;
> #ifdef CONFIG_FSL_SOC
> /* SPI controller is either clocked from QE or SoC clock. */
> pdata->sysclk = get_brgfreq();
--
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
prev parent reply other threads:[~2017-01-13 15:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 12:09 [PATCH] spi: spi-fsl-spi: Add OF bus-num property Joakim Tjernlund
[not found] ` <20161219120942.29022-1-joakim.tjernlund-27rvihrghlNWk0Htik3J/w@public.gmane.org>
2017-01-13 15:41 ` Joakim Tjernlund [this message]
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=1484322082.4044.0.camel@infinera.com \
--to=joakim.tjernlund-27rvihrghlnwk0htik3j/w@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@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).