wm8804.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * wm8804.h -- WM8804 S/PDIF transceiver driver
  4. *
  5. * Copyright 2010 Wolfson Microelectronics plc
  6. *
  7. * Author: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
  8. */
  9. #ifndef _WM8804_H
  10. #define _WM8804_H
  11. #include <linux/regmap.h>
  12. /*
  13. * Register values.
  14. */
  15. #define WM8804_RST_DEVID1 0x00
  16. #define WM8804_DEVID2 0x01
  17. #define WM8804_DEVREV 0x02
  18. #define WM8804_PLL1 0x03
  19. #define WM8804_PLL2 0x04
  20. #define WM8804_PLL3 0x05
  21. #define WM8804_PLL4 0x06
  22. #define WM8804_PLL5 0x07
  23. #define WM8804_PLL6 0x08
  24. #define WM8804_SPDMODE 0x09
  25. #define WM8804_INTMASK 0x0A
  26. #define WM8804_INTSTAT 0x0B
  27. #define WM8804_SPDSTAT 0x0C
  28. #define WM8804_RXCHAN1 0x0D
  29. #define WM8804_RXCHAN2 0x0E
  30. #define WM8804_RXCHAN3 0x0F
  31. #define WM8804_RXCHAN4 0x10
  32. #define WM8804_RXCHAN5 0x11
  33. #define WM8804_SPDTX1 0x12
  34. #define WM8804_SPDTX2 0x13
  35. #define WM8804_SPDTX3 0x14
  36. #define WM8804_SPDTX4 0x15
  37. #define WM8804_SPDTX5 0x16
  38. #define WM8804_GPO0 0x17
  39. #define WM8804_GPO1 0x18
  40. #define WM8804_GPO2 0x1A
  41. #define WM8804_AIFTX 0x1B
  42. #define WM8804_AIFRX 0x1C
  43. #define WM8804_SPDRX1 0x1D
  44. #define WM8804_PWRDN 0x1E
  45. #define WM8804_REGISTER_COUNT 30
  46. #define WM8804_MAX_REGISTER 0x1E
  47. #define WM8804_TX_CLKSRC_MCLK 1
  48. #define WM8804_TX_CLKSRC_PLL 2
  49. #define WM8804_CLKOUT_SRC_CLK1 3
  50. #define WM8804_CLKOUT_SRC_OSCCLK 4
  51. #define WM8804_CLKOUT_DIV 1
  52. #define WM8804_MCLK_DIV 2
  53. #define WM8804_MCLKDIV_256FS 0
  54. #define WM8804_MCLKDIV_128FS 1
  55. extern const struct regmap_config wm8804_regmap_config;
  56. extern const struct dev_pm_ops wm8804_pm;
  57. int wm8804_probe(struct device *dev, struct regmap *regmap);
  58. void wm8804_remove(struct device *dev);
  59. #endif /* _WM8804_H */