au0828-reg.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Driver for the Auvitek USB bridge
  3. *
  4. * Copyright (c) 2008 Steven Toth <stoth@linuxtv.org>
  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 as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. *
  15. * GNU General Public License for more details.
  16. */
  17. /* We'll start to rename these registers once we have a better
  18. * understanding of their meaning.
  19. */
  20. #define REG_000 0x000
  21. #define REG_001 0x001
  22. #define REG_002 0x002
  23. #define REG_003 0x003
  24. #define AU0828_SENSORCTRL_100 0x100
  25. #define AU0828_SENSORCTRL_VBI_103 0x103
  26. /* I2C registers */
  27. #define AU0828_I2C_TRIGGER_200 0x200
  28. #define AU0828_I2C_STATUS_201 0x201
  29. #define AU0828_I2C_CLK_DIVIDER_202 0x202
  30. #define AU0828_I2C_DEST_ADDR_203 0x203
  31. #define AU0828_I2C_WRITE_FIFO_205 0x205
  32. #define AU0828_I2C_READ_FIFO_209 0x209
  33. #define AU0828_I2C_MULTIBYTE_MODE_2FF 0x2ff
  34. /* Audio registers */
  35. #define AU0828_AUDIOCTRL_50C 0x50C
  36. #define REG_600 0x600
  37. /*********************************************************************/
  38. /* Here are constants for values associated with the above registers */
  39. /* I2C Trigger (Reg 0x200) */
  40. #define AU0828_I2C_TRIGGER_WRITE 0x01
  41. #define AU0828_I2C_TRIGGER_READ 0x20
  42. #define AU0828_I2C_TRIGGER_HOLD 0x40
  43. /* I2C Status (Reg 0x201) */
  44. #define AU0828_I2C_STATUS_READ_DONE 0x01
  45. #define AU0828_I2C_STATUS_NO_READ_ACK 0x02
  46. #define AU0828_I2C_STATUS_WRITE_DONE 0x04
  47. #define AU0828_I2C_STATUS_NO_WRITE_ACK 0x08
  48. #define AU0828_I2C_STATUS_BUSY 0x10
  49. /* I2C Clock Divider (Reg 0x202) */
  50. #define AU0828_I2C_CLK_250KHZ 0x07
  51. #define AU0828_I2C_CLK_100KHZ 0x14
  52. #define AU0828_I2C_CLK_30KHZ 0x40
  53. #define AU0828_I2C_CLK_20KHZ 0x60