From 6c1657623fd25e6ccc21d3a3ac628fba0307d611 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 12 Feb 2017 23:48:11 +0100 Subject: lantiq: update spi driver to upstream version These patches are backported from upstream Linux kernel. Signed-off-by: Hauke Mehrtens --- .../0090-spi-add-transfer_status-callback.patch | 42 ---------------------- 1 file changed, 42 deletions(-) delete mode 100644 target/linux/lantiq/patches-4.9/0090-spi-add-transfer_status-callback.patch (limited to 'target/linux/lantiq/patches-4.9/0090-spi-add-transfer_status-callback.patch') diff --git a/target/linux/lantiq/patches-4.9/0090-spi-add-transfer_status-callback.patch b/target/linux/lantiq/patches-4.9/0090-spi-add-transfer_status-callback.patch deleted file mode 100644 index de50e22..0000000 --- a/target/linux/lantiq/patches-4.9/0090-spi-add-transfer_status-callback.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/drivers/spi/spi.c -+++ b/drivers/spi/spi.c -@@ -1013,6 +1013,20 @@ static int spi_transfer_one_message(stru - msecs_to_jiffies(ms)); - } - -+ if (master->transfer_status) { -+ ret = master->transfer_status(master, ms); -+ if (ret) { -+ SPI_STATISTICS_INCREMENT_FIELD(statm, -+ errors); -+ SPI_STATISTICS_INCREMENT_FIELD(stats, -+ errors); -+ dev_err(&msg->spi->dev, -+ "SPI transfer status: %d\n", -+ ret); -+ goto out; -+ } -+ } -+ - if (ms == 0) { - SPI_STATISTICS_INCREMENT_FIELD(statm, - timedout); ---- a/include/linux/spi/spi.h -+++ b/include/linux/spi/spi.h -@@ -370,6 +370,8 @@ static inline void spi_unregister_driver - * transfer_one_message are mutually exclusive; when both - * are set, the generic subsystem does not call your - * transfer_one callback. -+ * @transfer_status: This callback allows the driver to return an error code -+ * in case the scheduled single spi transfer failed. - * @handle_err: the subsystem calls the driver to handle an error that occurs - * in the generic implementation of transfer_one_message(). - * @unprepare_message: undo any work done by prepare_message(). -@@ -546,6 +548,7 @@ struct spi_master { - void (*set_cs)(struct spi_device *spi, bool enable); - int (*transfer_one)(struct spi_master *master, struct spi_device *spi, - struct spi_transfer *transfer); -+ int (*transfer_status)(struct spi_master *master, unsigned long timeout); - void (*handle_err)(struct spi_master *master, - struct spi_message *message); - -- cgit v1.1