summaryrefslogtreecommitdiffstats
path: root/include/linux/spi/dw_spi.h
diff options
context:
space:
mode:
authorGeorge Shore2010-01-21 12:40:48 +0100
committerGrant Likely2010-01-21 15:24:29 +0100
commit83fe518a839e317480e50a138ef4acd73510d7ce (patch)
treea13e5fba61277441066aaf371cd378af4149ac8a /include/linux/spi/dw_spi.h
parentspi/dw_spi: add a FIFO depth detection (diff)
downloadkernel-qcow2-linux-83fe518a839e317480e50a138ef4acd73510d7ce.tar.gz
kernel-qcow2-linux-83fe518a839e317480e50a138ef4acd73510d7ce.tar.xz
kernel-qcow2-linux-83fe518a839e317480e50a138ef4acd73510d7ce.zip
spi/dw_spi: enable platform specific chipselect.
The driver core allows for a platform-specific chipselect assert/deassert function, however the chipselect function in the core doesn't take advantage of this fact. This enables the use of a custom function, should it be defined. Signed-off-by: George Shore <george@georgeshore.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/spi/dw_spi.h')
-rw-r--r--include/linux/spi/dw_spi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/spi/dw_spi.h b/include/linux/spi/dw_spi.h
index 1a127a31e017..cc813f95a2f2 100644
--- a/include/linux/spi/dw_spi.h
+++ b/include/linux/spi/dw_spi.h
@@ -172,6 +172,10 @@ static inline void spi_chip_sel(struct dw_spi *dws, u16 cs)
{
if (cs > dws->num_cs)
return;
+
+ if (dws->cs_control)
+ dws->cs_control(1);
+
dw_writel(dws, ser, 1 << cs);
}