Re: [PATCH] spi-imx: imx6q add single burst transfer support

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

 



On Wed, Jun 01, 2016 at 12:50:28PM +0800, Chris Ruehl wrote:
> The patch add support for single burst transfer where chipselect will
> hold active until transfer completes with a limit to 2^7 words transferred.
> The single-burst-mode need set the burstlength in ECSPI_CONREG.BURST_LENGTH
> and clear the ecspi channel related ss_ctl flag in ECSPI_CONFIGREG.SS_CTL.
> 
> The single-burst-mode is disabled by default. The activation from spidev
> is implemented by set bit0 of the xfer.speed_hz, which don't break anything
> in the mx51_ecspi_clkdiv() function.
> 
> xfer[0].speed_hz = 2000000 | 0x1; /* enable single burst mode with 1hz */

Erm, no. This is not acceptable in many ways. First of all the SPI API
between the kernel and userspace is driver agnostic. There is simply no
place for passing driver specific quirks from userspace to the spi-imx
driver. Then there is no API change needed because the way SPI
messages should be translated to the wire is well defined, the spi-imx
driver is just doing it wrong in this case which might be worth fixing.
This could be done without passing a "do it right" flag to the driver.

As noted in my response to the previous patch, I don't think we need a
fix for this at all, because we can always use GPIO chip selects which
works reliably not only in this case, but also in other cases where the
controller driven chipselect falls apart.

IMO there is only a single reason to keep controller driven chip select
support at all: On i.MX31 there is one dedicated chip select which can't
be configured as GPIO.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
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