summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-dw.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-08-10 17:51:52 +0100
committerMark Brown <broonie@kernel.org>2018-08-10 17:51:52 +0100
commitc1acb21b32a3bb601453764c9eac9fc8fbb3a81d (patch)
tree015050d0c0df5ec3fa92068143f837ff97903072 /drivers/spi/spi-dw.c
parentc3c7126248a0750790ee33c4bd80a1847f55f5b6 (diff)
parent401c0d7712eb3189023efc9c0708a2ac984ed62e (diff)
Merge branch 'spi-4.19' into spi-next
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r--drivers/spi/spi-dw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index a087464efdd7..ac2eb89ef7a5 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -133,7 +133,7 @@ static inline void dw_spi_debugfs_remove(struct dw_spi *dws)
}
#endif /* CONFIG_DEBUG_FS */
-static void dw_spi_set_cs(struct spi_device *spi, bool enable)
+void dw_spi_set_cs(struct spi_device *spi, bool enable)
{
struct dw_spi *dws = spi_controller_get_devdata(spi->controller);
struct chip_data *chip = spi_get_ctldata(spi);
@@ -145,6 +145,7 @@ static void dw_spi_set_cs(struct spi_device *spi, bool enable)
if (!enable)
dw_writel(dws, DW_SPI_SER, BIT(spi->chip_select));
}
+EXPORT_SYMBOL_GPL(dw_spi_set_cs);
/* Return the max entries we can fill into tx fifo */
static inline u32 tx_max(struct dw_spi *dws)
@@ -507,6 +508,9 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
master->dev.of_node = dev->of_node;
master->flags = SPI_MASTER_GPIO_SS;
+ if (dws->set_cs)
+ master->set_cs = dws->set_cs;
+
/* Basic HW init */
spi_hw_init(dev, dws);