From: Pandy Gao <pandy.gao-3arQi8VN3Tc@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Frank Li <frank.li-3arQi8VN3Tc@public.gmane.org>,
Andy Duan <fugang.duan-3arQi8VN3Tc@public.gmane.org>
Subject: RE: [Patch V2 1/2] spi: imx: add lpspi bus driver
Date: Tue, 22 Nov 2016 13:39:24 +0000 [thread overview]
Message-ID: <AM4PR0401MB1780C8905FA43D2F392A7CE3F6B40@AM4PR0401MB1780.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20161121172415.vtx7gahbzfgxconf-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
From: Mark Brown <mailto:broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Sent: Tuesday, November 22, 2016 1:24 AM
> To: Pandy Gao <pandy.gao-3arQi8VN3Tc@public.gmane.org>
> Cc: robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org; linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Frank Li
> <frank.li-3arQi8VN3Tc@public.gmane.org>; Andy Duan <fugang.duan-3arQi8VN3Tc@public.gmane.org>
> Subject: Re: [Patch V2 1/2] spi: imx: add lpspi bus driver
>
> On Thu, Nov 17, 2016 at 09:55:41AM +0000, Pandy Gao wrote:
>
> Please fix your mail client to word wrap within paragraphs at something
> substantially less than 80 columns. Doing this makes your messages
> much easier to read and reply to.
Thanks for the advice.
> > From: Mark Brown <mailto:broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Sent: Thursday,
> November
> > 17, 2016 1:32 AM
>
> > > Why are we not also unpreparing the clock when the driver is idle?
>
> > I use clk_enable() rather than clk_prepare_enable() here to avoid
> > potential sleeping in runtime cause by clk_prepare(). clk is prepare
> > in fsl_lpspi_probe() and unprepared in fsl_lpspi_remove().
>
> It's absolutely fine to sleep in runtime PM and in the SPI hardware
> prepare and unprepare.
Thanks, will change it in next version.
> > > Why are we doing this linearization into a single buffer?
>
> > For a spi transfer transmitted by lpspi, the clk for the last bit is
> > incomplete. The last rising edge never comes unless we manually
> > de-assert SS. In case that a spi message contains multiple transfers,
> > SS should be de-asserted for each transfer.
>
> > However, for spi device such as m25p80, SS should keep asserted
> during
> > a whole message. So we need do this linearization here.
>
> And the hardware can't do any kind of scatter/gather? There's two
> things here - one is the combining everything into one hardware
> operation which isn't that uncommon a limitation (though obviously it's
> disappointing) and the other is the fact that in order to do this everything
> gets copied into and out of this one buffer which obviously adds quite a
> bit of overhead.
Thanks, you are right. It's really not a good solution. Will change it in next
version.
Best Regards
Gao Pan
--
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:[~2016-11-22 13:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 13:33 [Patch V2 1/2] spi: imx: add lpspi bus driver Gao Pan
[not found] ` <1479216831-8709-1-git-send-email-pandy.gao-3arQi8VN3Tc@public.gmane.org>
2016-11-15 13:33 ` [Patch V2 2/2] spi: imx: add devicetree binding for lpspi Gao Pan
2016-11-16 17:32 ` [Patch V2 1/2] spi: imx: add lpspi bus driver Mark Brown
[not found] ` <20161116173228.cqtt5j5eczgg26gn-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-11-17 9:55 ` Pandy Gao
[not found] ` <AM4PR0401MB1780CDE562EEA1CE202E9572F6B10-4rsfagO7TJzc3fSXliz02I3W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2016-11-21 17:24 ` Mark Brown
[not found] ` <20161121172415.vtx7gahbzfgxconf-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-11-22 13:39 ` Pandy Gao [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=AM4PR0401MB1780C8905FA43D2F392A7CE3F6B40@AM4PR0401MB1780.eurprd04.prod.outlook.com \
--to=pandy.gao-3arqi8vn3tc@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=frank.li-3arQi8VN3Tc@public.gmane.org \
--cc=fugang.duan-3arQi8VN3Tc@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@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).