connectTheSignalSlot.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Analog Devices SPI3 controller driver
  3. *
  4. * Copyright (c) 2011 Analog Devices Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19. #ifndef _SPI_CHANNEL_H_
  20. #define _SPI_CHANNEL_H_
  21. #include <linux/types.h>
  22. /* SPI_CONTROL */
  23. #define SPI_CTL_EN 0x00000001 /* Enable */
  24. #define SPI_CTL_MSTR 0x00000002 /* Master/Slave */
  25. #define SPI_CTL_PSSE 0x00000004 /* controls modf error in master mode */
  26. #define SPI_CTL_ODM 0x00000008 /* Open Drain Mode */
  27. #define SPI_CTL_CPHA 0x00000010 /* Clock Phase */
  28. #define SPI_CTL_CPOL 0x00000020 /* Clock Polarity */
  29. #define SPI_CTL_ASSEL 0x00000040 /* Slave Select Pin Control */
  30. #define SPI_CTL_SELST 0x00000080 /* Slave Select Polarity in-between transfers */
  31. #define SPI_CTL_EMISO 0x00000100 /* Enable MISO */
  32. #define SPI_CTL_SIZE 0x00000600 /* Word Transfer Size */
  33. #define SPI_CTL_SIZE08 0x00000000 /* SIZE: 8 bits */
  34. #define SPI_CTL_SIZE16 0x00000200 /* SIZE: 16 bits */
  35. #define SPI_CTL_SIZE32 0x00000400 /* SIZE: 32 bits */
  36. #define SPI_CTL_LSBF 0x00001000 /* LSB First */
  37. #define SPI_CTL_FCEN 0x00002000 /* Flow-Control Enable */
  38. #define SPI_CTL_FCCH 0x00004000 /* Flow-Control Channel Selection */
  39. #define SPI_CTL_FCPL 0x00008000 /* Flow-Control Polarity */
  40. #define SPI_CTL_FCWM 0x00030000 /* Flow-Control Water-Mark */
  41. #define SPI_CTL_FIFO0 0x00000000 /* FCWM: TFIFO empty or RFIFO Full */
  42. #define SPI_CTL_FIFO1 0x00010000 /* FCWM: TFIFO 75% or more empty or RFIFO 75% or more full */
  43. #define SPI_CTL_FIFO2 0x00020000 /* FCWM: TFIFO 50% or more empty or RFIFO 50% or more full */
  44. #define SPI_CTL_FMODE 0x00040000 /* Fast-mode Enable */
  45. #define SPI_CTL_MIOM 0x00300000 /* Multiple I/O Mode */
  46. #define SPI_CTL_MIO_DIS 0x00000000 /* MIOM: Disable */
  47. #define SPI_CTL_MIO_DUAL 0x00100000 /* MIOM: Enable DIOM (Dual I/O Mode) */
  48. #define SPI_CTL_MIO_QUAD 0x00200000 /* MIOM: Enable QUAD (Quad SPI Mode) */
  49. #define SPI_CTL_SOSI 0x00400000 /* Start on MOSI */
  50. /* SPI_RX_CONTROL */
  51. #define SPI_RXCTL_REN 0x00000001 /* Receive Channel Enable */
  52. #define SPI_RXCTL_RTI 0x00000004 /* Receive Transfer Initiate */
  53. #define SPI_RXCTL_RWCEN 0x00000008 /* Receive Word Counter Enable */