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

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

 



 From: Mark Brown <mailto:broonie@xxxxxxxxxx> Sent: Tuesday, November 22, 2016 1:24 AM
> To: Pandy Gao <pandy.gao@xxxxxxx>
> Cc: robh@xxxxxxxxxx; linux-spi@xxxxxxxxxxxxxxx; Frank Li
> <frank.li@xxxxxxx>; Andy Duan <fugang.duan@xxxxxxx>
> 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@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.

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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