au0828-reg.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Driver for the Auvitek USB bridge
  4. *
  5. * Copyright (c) 2008 Steven Toth <[email protected]>
  6. */
  7. /* We'll start to rename these registers once we have a better
  8. * understanding of their meaning.
  9. */
  10. #define REG_000 0x000
  11. #define REG_001 0x001
  12. #define REG_002 0x002
  13. #define REG_003 0x003
  14. #define AU0828_SENSORCTRL_100 0x100
  15. #define AU0828_SENSORCTRL_VBI_103 0x103
  16. /* I2C registers */
  17. #define AU0828_I2C_TRIGGER_200 0x200
  18. #define AU0828_I2C_STATUS_201 0x201
  19. #define AU0828_I2C_CLK_DIVIDER_202 0x202
  20. #define AU0828_I2C_DEST_ADDR_203 0x203
  21. #define AU0828_I2C_WRITE_FIFO_205 0x205
  22. #define AU0828_I2C_READ_FIFO_209 0x209
  23. #define AU0828_I2C_MULTIBYTE_MODE_2FF 0x2ff
  24. /* Audio registers */
  25. #define AU0828_AUDIOCTRL_50C 0x50C
  26. #define REG_600 0x600
  27. /*********************************************************************/
  28. /* Here are constants for values associated with the above registers */
  29. /* I2C Trigger (Reg 0x200) */
  30. #define AU0828_I2C_TRIGGER_WRITE 0x01
  31. #define AU0828_I2C_TRIGGER_READ 0x20
  32. #define AU0828_I2C_TRIGGER_HOLD 0x40
  33. /* I2C Status (Reg 0x201) */
  34. #define AU0828_I2C_STATUS_READ_DONE 0x01
  35. #define AU0828_I2C_STATUS_NO_READ_ACK 0x02
  36. #define AU0828_I2C_STATUS_WRITE_DONE 0x04
  37. #define AU0828_I2C_STATUS_NO_WRITE_ACK 0x08
  38. #define AU0828_I2C_STATUS_BUSY 0x10
  39. /* I2C Clock Divider (Reg 0x202) */
  40. #define AU0828_I2C_CLK_250KHZ 0x07
  41. #define AU0828_I2C_CLK_100KHZ 0x14
  42. #define AU0828_I2C_CLK_30KHZ 0x40
  43. #define AU0828_I2C_CLK_20KHZ 0x60