au0828-reg.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. /* We'll start to rename these registers once we have a better
  22. * understanding of their meaning.
  23. */
  24. #define REG_000 0x000
  25. #define REG_001 0x001
  26. #define REG_002 0x002
  27. #define REG_003 0x003
  28. #define AU0828_SENSORCTRL_100 0x100
  29. #define AU0828_SENSORCTRL_VBI_103 0x103
  30. /* I2C registers */
  31. #define AU0828_I2C_TRIGGER_200 0x200
  32. #define AU0828_I2C_STATUS_201 0x201
  33. #define AU0828_I2C_CLK_DIVIDER_202 0x202
  34. #define AU0828_I2C_DEST_ADDR_203 0x203
  35. #define AU0828_I2C_WRITE_FIFO_205 0x205
  36. #define AU0828_I2C_READ_FIFO_209 0x209
  37. #define AU0828_I2C_MULTIBYTE_MODE_2FF 0x2ff
  38. /* Audio registers */
  39. #define AU0828_AUDIOCTRL_50C 0x50C
  40. #define REG_600 0x600
  41. /*********************************************************************/
  42. /* Here are constants for values associated with the above registers */
  43. /* I2C Trigger (Reg 0x200) */
  44. #define AU0828_I2C_TRIGGER_WRITE 0x01
  45. #define AU0828_I2C_TRIGGER_READ 0x20
  46. #define AU0828_I2C_TRIGGER_HOLD 0x40
  47. /* I2C Status (Reg 0x201) */
  48. #define AU0828_I2C_STATUS_READ_DONE 0x01
  49. #define AU0828_I2C_STATUS_NO_READ_ACK 0x02
  50. #define AU0828_I2C_STATUS_WRITE_DONE 0x04
  51. #define AU0828_I2C_STATUS_NO_WRITE_ACK 0x08
  52. #define AU0828_I2C_STATUS_BUSY 0x10
  53. /* I2C Clock Divider (Reg 0x202) */
  54. #define AU0828_I2C_CLK_250KHZ 0x07
  55. #define AU0828_I2C_CLK_100KHZ 0x14
  56. #define AU0828_I2C_CLK_30KHZ 0x40
  57. #define AU0828_I2C_CLK_20KHZ 0x60