summaryrefslogtreecommitdiffstats
path: root/drivers/power/ds2781_battery.c
diff options
context:
space:
mode:
authorJonatas Rech <jonatas.rech@datacom.ind.br>2015-04-15 12:23:18 -0300
committerMark Brown <broonie@kernel.org>2015-04-25 14:00:09 +0100
commit2000058e892cd6773b3061a56c0bd6535ac15afe (patch)
tree037b3d1922e56e05c5082cc710725b9cce223a11 /drivers/power/ds2781_battery.c
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
downloadtalos-op-linux-2000058e892cd6773b3061a56c0bd6535ac15afe.tar.gz
talos-op-linux-2000058e892cd6773b3061a56c0bd6535ac15afe.zip
spi: fsl-espi: fix behaviour for full-duplex xfers
This patch makes possible for protocol drivers to do full-duplex SPI transfers properly. Until now this driver could only be used for half-duplex transfers, since it always expected an spi_transfer with non-null tx_buf to be only used for TX, and those with non-null rx_buf to be only used for RX. The fix consists in correcting the fsl_espi_transfer length by taking into consideration duplex spi_transfers, and not just by adding n_tx and n_rx. Furthermore, this correction has exposed an inconsistency in the protocol driver <-> controller driver interaction. The spi-fsl-espi driver artificially inserts TX bytes when message fragmentation is necessary (due to SPCOM_TRANLEN_MAX) instead of informing the protocol driver of the hardware limitation. This was tested with the m25p80 NOR flash protocol driver. Since fixing this issue may cause other client drivers to malfunction, it was left as is. Signed-off-by: Jonatas Rech <jonatas.rech@datacom.ind.br> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/power/ds2781_battery.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud