Advertisement
Guest User

Snippet from drivers/mfd/wl1273-core.c

a guest
Jul 23rd, 2011
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.59 KB | None | 0 0
  1. /* I2S mode */
  2. #define WL1273_IS2_WIDTH_32 0x0
  3. #define WL1273_IS2_WIDTH_40 0x1
  4. #define WL1273_IS2_WIDTH_22_23  0x2
  5. #define WL1273_IS2_WIDTH_23_22  0x3
  6. #define WL1273_IS2_WIDTH_48 0x4
  7. #define WL1273_IS2_WIDTH_50 0x5
  8. #define WL1273_IS2_WIDTH_60 0x6
  9. #define WL1273_IS2_WIDTH_64 0x7
  10. #define WL1273_IS2_WIDTH_80 0x8
  11. #define WL1273_IS2_WIDTH_96 0x9
  12. #define WL1273_IS2_WIDTH_128    0xa
  13. #define WL1273_IS2_WIDTH    0xf
  14.  
  15. #define WL1273_IS2_FORMAT_STD   (0x0 << 4)
  16. #define WL1273_IS2_FORMAT_LEFT  (0x1 << 4)
  17. #define WL1273_IS2_FORMAT_RIGHT (0x2 << 4)
  18. #define WL1273_IS2_FORMAT_USER  (0x3 << 4)
  19.  
  20. #define WL1273_IS2_MASTER   (0x0 << 6)
  21. #define WL1273_IS2_SLAVEW   (0x1 << 6)
  22.  
  23. #define WL1273_IS2_TRI_AFTER_SENDING    (0x0 << 7)
  24. #define WL1273_IS2_TRI_ALWAYS_ACTIVE    (0x1 << 7)
  25.  
  26. #define WL1273_IS2_SDOWS_RR (0x0 << 8)
  27. #define WL1273_IS2_SDOWS_RF (0x1 << 8)
  28. #define WL1273_IS2_SDOWS_FR (0x2 << 8)
  29. #define WL1273_IS2_SDOWS_FF (0x3 << 8)
  30.  
  31. #define WL1273_IS2_TRI_OPT  (0x0 << 10)
  32. #define WL1273_IS2_TRI_ALWAYS   (0x1 << 10)
  33.  
  34. #define WL1273_IS2_RATE_48K (0x0 << 12)
  35. #define WL1273_IS2_RATE_44_1K   (0x1 << 12)
  36. #define WL1273_IS2_RATE_32K (0x2 << 12)
  37. #define WL1273_IS2_RATE_22_05K  (0x4 << 12)
  38. #define WL1273_IS2_RATE_16K (0x5 << 12)
  39. #define WL1273_IS2_RATE_12K (0x8 << 12)
  40. #define WL1273_IS2_RATE_11_025  (0x9 << 12)
  41. #define WL1273_IS2_RATE_8K  (0xa << 12)
  42. #define WL1273_IS2_RATE     (0xf << 12)
  43.  
  44. #define WL1273_I2S_DEF_MODE (WL1273_IS2_WIDTH_32 | \
  45.                  WL1273_IS2_FORMAT_STD | \
  46.                  WL1273_IS2_MASTER | \
  47.                  WL1273_IS2_TRI_AFTER_SENDING | \
  48.                  WL1273_IS2_SDOWS_RR | \
  49.                  WL1273_IS2_TRI_OPT | \
  50.                  WL1273_IS2_RATE_48K)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement