spi: Avoid setting the chip select if we don't need to
[sfrench/cifs-2.6.git] / include / linux / spi / spi.h
index b4917df79637462ca788205cea6999ffb5467c22..0e67a9a3a1d35840d4720eb0b866744a37c9a1f4 100644 (file)
@@ -368,6 +368,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
  * @cur_msg_prepared: spi_prepare_message was called for the currently
  *                    in-flight message
  * @cur_msg_mapped: message has been mapped for DMA
+ * @last_cs_enable: was enable true on the last call to set_cs.
+ * @last_cs_mode_high: was (mode & SPI_CS_HIGH) true on the last call to set_cs.
  * @xfer_completion: used by core transfer_one_message()
  * @busy: message pump is busy
  * @running: message pump is running
@@ -604,6 +606,8 @@ struct spi_controller {
        bool                            auto_runtime_pm;
        bool                            cur_msg_prepared;
        bool                            cur_msg_mapped;
+       bool                            last_cs_enable;
+       bool                            last_cs_mode_high;
        bool                            fallback;
        struct completion               xfer_completion;
        size_t                          max_dma_len;