spi/dw_spi: enable platform specific chipselect.
authorGeorge Shore <george@georgeshore.com>
Thu, 21 Jan 2010 11:40:48 +0000 (11:40 +0000)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 21 Jan 2010 14:24:29 +0000 (07:24 -0700)
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>
include/linux/spi/dw_spi.h

index 1a127a3..cc813f9 100644 (file)
@@ -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);
 }