[PATCH 0/5] spi: imx: Fix polarity switching for mx51-ecspi

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

 



Hello,

this series fixes a problem found on an i.MX6 machine where on a single
spi bus there are two spi devices with different clock polarities. The
effect was that the polarity was adapted to the device to communicate
with only after the chip select was asserted.

The reason this happened is that the polarity was only configured as
part of the spi core's .transfer_one callback which is called in
spi_transfer_one_message() only after CS was asserted. The relevant
patch (2) moves this initialisation to the .prepare_message callback.

The first patch is a preparatory patch and the last three are cleanups I
noticed on the way.

Note that this patch set only fixes i.MX51 and later, the earlier i.MX
SoCs are affected by the same problem though.

There is delay in mx51_ecspi_prepare_transfer (the new name for
mx51_ecspi_config) that fixes (or works around) a problem that smells a
bit similar. Maybe this can be dropped with my changes? I didn't test
this, but maybe Marek (on Cc:) can comment/test.

Best regards
Uwe

Uwe Kleine-König (5):
  spi: imx: add a device specific prepare_message callback
  spi: imx: mx51-ecspi: Move some initialisation to prepare_message
    hook.
  spi: imx: style fixes
  spi: imx: rename config callback and add useful parameters
  spi: imx: drop useless member speed_hz from driver data struct

 drivers/spi/spi-imx.c | 144 +++++++++++++++++++++++++++++-------------
 1 file changed, 99 insertions(+), 45 deletions(-)

-- 
2.19.1




[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