diff options
| author | Mark Brown <[email protected]> | 2024-05-29 11:08:20 +0100 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2024-05-29 11:08:20 +0100 |
| commit | dd2b6374543b462eae3d5673db3644888d3e2b80 (patch) | |
| tree | 138d57282c4a9e1d88b7329da2a765e801f2beae /include/linux | |
| parent | b0d8c563f0fb1dba8b10edc2553783f6ad058303 (diff) | |
| parent | b90cc232e2ce8c959b19dc4b183e23e7aec137ab (diff) | |
spi: bitbang: Clean up the driver
Merge series from Andy Shevchenko <[email protected]>:
A few cleanups to the driver. No functional change intended.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/spi/spi_bitbang.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index b930eca2ef7b..d4cb83195f7a 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h @@ -4,6 +4,8 @@ #include <linux/workqueue.h> +typedef u32 (*spi_bb_txrx_word_fn)(struct spi_device *, unsigned int, u32, u8, unsigned int); + struct spi_bitbang { struct mutex lock; u8 busy; @@ -28,9 +30,8 @@ struct spi_bitbang { int (*txrx_bufs)(struct spi_device *spi, struct spi_transfer *t); /* txrx_word[SPI_MODE_*]() just looks like a shift register */ - u32 (*txrx_word[4])(struct spi_device *spi, - unsigned nsecs, - u32 word, u8 bits, unsigned flags); + spi_bb_txrx_word_fn txrx_word[SPI_MODE_X_MASK + 1]; + int (*set_line_direction)(struct spi_device *spi, bool output); }; |