summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-dw.h
diff options
context:
space:
mode:
authorMatthias Seidel <kernel@mseidel.net>2016-09-04 03:04:49 +0300
committerMark Brown <broonie@kernel.org>2016-09-06 13:53:50 +0300
commit13b10301b858e355613bfc6dc297580bf34d3fb5 (patch)
treebe671ff360bb3c0f4c88982f6c64ed8a36193692 /drivers/spi/spi-dw.h
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
downloadlinux-13b10301b858e355613bfc6dc297580bf34d3fb5.tar.xz
spi: dw: fix multiple slaves with different baudrates
Add current master clock to dws struct and compare it against the requestedtransfer speed. Update clock divider only if necessary. Signed-off-by: Matthias Seidel <kernel@mseidel.net> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-dw.h')
-rw-r--r--drivers/spi/spi-dw.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h
index 61bc3cbab38d..c21ca02f8ec5 100644
--- a/drivers/spi/spi-dw.h
+++ b/drivers/spi/spi-dw.h
@@ -123,6 +123,7 @@ struct dw_spi {
u8 n_bytes; /* current is a 1/2 bytes op */
u32 dma_width;
irqreturn_t (*transfer_handler)(struct dw_spi *dws);
+ u32 current_freq; /* frequency in hz */
/* DMA info */
int dma_inited;