--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
-@@ -3633,6 +3633,7 @@ static int __spi_validate_bits_per_word(
+@@ -3675,6 +3675,7 @@ static int spi_set_cs_timing(struct spi_
*/
int spi_setup(struct spi_device *spi)
{
unsigned bad_bits, ugly_bits;
int status = 0;
-@@ -3653,6 +3654,14 @@ int spi_setup(struct spi_device *spi)
+@@ -3695,6 +3696,14 @@ int spi_setup(struct spi_device *spi)
(SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL |
SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL)))
return -EINVAL;
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
-@@ -1374,6 +1374,70 @@ static int spi_transfer_wait(struct spi_
+@@ -1385,6 +1385,70 @@ static int spi_transfer_wait(struct spi_
return 0;
}
static void _spi_transfer_delay_ns(u32 ns)
{
if (!ns)
-@@ -2208,6 +2272,75 @@ void spi_flush_queue(struct spi_controll
+@@ -2219,6 +2283,75 @@ void spi_flush_queue(struct spi_controll
/*-------------------------------------------------------------------------*/
#if defined(CONFIG_OF)
static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi,
struct device_node *nc)
{
-@@ -2326,6 +2459,10 @@ of_register_spi_device(struct spi_contro
+@@ -2337,6 +2470,10 @@ of_register_spi_device(struct spi_contro
if (rc)
goto err_out;
spi->dev.of_node = nc;
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
-@@ -298,6 +298,40 @@ struct spi_driver {
+@@ -318,6 +318,40 @@ struct spi_driver {
struct device_driver driver;
};
static inline struct spi_driver *to_spi_driver(struct device_driver *drv)
{
return drv ? container_of(drv, struct spi_driver, driver) : NULL;
-@@ -683,6 +717,11 @@ struct spi_controller {
+@@ -703,6 +737,11 @@ struct spi_controller {
void *dummy_rx;
void *dummy_tx;
int (*fw_translate_cs)(struct spi_controller *ctlr, unsigned cs);
/*
-@@ -1490,6 +1529,9 @@ spi_register_board_info(struct spi_board
+@@ -1510,6 +1549,9 @@ spi_register_board_info(struct spi_board
{ return 0; }
#endif