Re: [Patch V2 1/2] spi: imx: add lpspi bus driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

> From: Mark Brown <mailto:broonie@xxxxxxxxxx> 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.

> > 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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux