~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/spi/spi_bitbang.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/spi/spi_bitbang.h (Architecture mips) and /include/linux/spi/spi_bitbang.h (Architecture alpha)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __SPI_BITBANG_H                             2 #ifndef __SPI_BITBANG_H
  3 #define __SPI_BITBANG_H                             3 #define __SPI_BITBANG_H
  4                                                     4 
  5 #include <linux/workqueue.h>                        5 #include <linux/workqueue.h>
  6                                                     6 
  7 typedef u32 (*spi_bb_txrx_word_fn)(struct spi_      7 typedef u32 (*spi_bb_txrx_word_fn)(struct spi_device *, unsigned int, u32, u8, unsigned int);
  8                                                     8 
  9 struct spi_bitbang {                                9 struct spi_bitbang {
 10         struct mutex            lock;              10         struct mutex            lock;
 11         u8                      busy;              11         u8                      busy;
 12         u8                      use_dma;           12         u8                      use_dma;
 13         u16                     flags;             13         u16                     flags;          /* extra spi->mode support */
 14                                                    14 
 15         struct spi_controller   *ctlr;             15         struct spi_controller   *ctlr;
 16                                                    16 
 17         /* setup_transfer() changes clock and/     17         /* setup_transfer() changes clock and/or wordsize to match settings
 18          * for this transfer; zeroes restore d     18          * for this transfer; zeroes restore defaults from spi_device.
 19          */                                        19          */
 20         int     (*setup_transfer)(struct spi_d     20         int     (*setup_transfer)(struct spi_device *spi,
 21                         struct spi_transfer *t     21                         struct spi_transfer *t);
 22                                                    22 
 23         void    (*chipselect)(struct spi_devic     23         void    (*chipselect)(struct spi_device *spi, int is_on);
 24 #define BITBANG_CS_ACTIVE       1       /* nor     24 #define BITBANG_CS_ACTIVE       1       /* normally nCS, active low */
 25 #define BITBANG_CS_INACTIVE     0                  25 #define BITBANG_CS_INACTIVE     0
 26                                                    26 
 27         void    (*set_mosi_idle)(struct spi_de     27         void    (*set_mosi_idle)(struct spi_device *spi);
 28         /* txrx_bufs() may handle dma mapping      28         /* txrx_bufs() may handle dma mapping for transfers that don't
 29          * already have one (transfer.{tx,rx}_     29          * already have one (transfer.{tx,rx}_dma is zero), or use PIO
 30          */                                        30          */
 31         int     (*txrx_bufs)(struct spi_device     31         int     (*txrx_bufs)(struct spi_device *spi, struct spi_transfer *t);
 32                                                    32 
 33         /* txrx_word[SPI_MODE_*]() just looks      33         /* txrx_word[SPI_MODE_*]() just looks like a shift register */
 34         spi_bb_txrx_word_fn txrx_word[SPI_MODE     34         spi_bb_txrx_word_fn txrx_word[SPI_MODE_X_MASK + 1];
 35                                                    35 
 36         int     (*set_line_direction)(struct s     36         int     (*set_line_direction)(struct spi_device *spi, bool output);
 37 };                                                 37 };
 38                                                    38 
 39 /* you can call these default bitbang->master      39 /* you can call these default bitbang->master methods from your custom
 40  * methods, if you like.                           40  * methods, if you like.
 41  */                                                41  */
 42 extern int spi_bitbang_setup(struct spi_device     42 extern int spi_bitbang_setup(struct spi_device *spi);
 43 extern void spi_bitbang_cleanup(struct spi_dev     43 extern void spi_bitbang_cleanup(struct spi_device *spi);
 44 extern int spi_bitbang_setup_transfer(struct s     44 extern int spi_bitbang_setup_transfer(struct spi_device *spi,
 45                                       struct s     45                                       struct spi_transfer *t);
 46                                                    46 
 47 /* start or stop queue processing */               47 /* start or stop queue processing */
 48 extern int spi_bitbang_start(struct spi_bitban     48 extern int spi_bitbang_start(struct spi_bitbang *spi);
 49 extern int spi_bitbang_init(struct spi_bitbang     49 extern int spi_bitbang_init(struct spi_bitbang *spi);
 50 extern void spi_bitbang_stop(struct spi_bitban     50 extern void spi_bitbang_stop(struct spi_bitbang *spi);
 51                                                    51 
 52 #endif  /* __SPI_BITBANG_H */                      52 #endif  /* __SPI_BITBANG_H */
 53                                                    53 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php