msm-cdc-common.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #include <linux/regmap.h>
  13. #include "sdm660-cdc-registers.h"
  14. extern struct reg_default
  15. msm89xx_cdc_core_defaults[MSM89XX_CDC_CORE_CACHE_SIZE];
  16. extern struct reg_default
  17. msm89xx_pmic_cdc_defaults[MSM89XX_PMIC_CDC_CACHE_SIZE];
  18. bool msm89xx_cdc_core_readable_reg(struct device *dev, unsigned int reg);
  19. bool msm89xx_cdc_core_writeable_reg(struct device *dev, unsigned int reg);
  20. bool msm89xx_cdc_core_volatile_reg(struct device *dev, unsigned int reg);
  21. enum {
  22. AIF1_PB = 0,
  23. AIF1_CAP,
  24. AIF2_VIFEED,
  25. AIF3_SVA,
  26. NUM_CODEC_DAIS,
  27. };
  28. enum codec_versions {
  29. TOMBAK_1_0,
  30. TOMBAK_2_0,
  31. CONGA,
  32. CAJON,
  33. CAJON_2_0,
  34. DIANGU,
  35. DRAX_CDC,
  36. UNSUPPORTED,
  37. };
  38. /* Support different hph modes */
  39. enum {
  40. NORMAL_MODE = 0,
  41. HD2_MODE,
  42. };
  43. enum dig_cdc_notify_event {
  44. DIG_CDC_EVENT_INVALID,
  45. DIG_CDC_EVENT_CLK_ON,
  46. DIG_CDC_EVENT_CLK_OFF,
  47. DIG_CDC_EVENT_RX1_MUTE_ON,
  48. DIG_CDC_EVENT_RX1_MUTE_OFF,
  49. DIG_CDC_EVENT_RX2_MUTE_ON,
  50. DIG_CDC_EVENT_RX2_MUTE_OFF,
  51. DIG_CDC_EVENT_RX3_MUTE_ON,
  52. DIG_CDC_EVENT_RX3_MUTE_OFF,
  53. DIG_CDC_EVENT_PRE_RX1_INT_ON,
  54. DIG_CDC_EVENT_PRE_RX2_INT_ON,
  55. DIG_CDC_EVENT_POST_RX1_INT_OFF,
  56. DIG_CDC_EVENT_POST_RX2_INT_OFF,
  57. DIG_CDC_EVENT_SSR_DOWN,
  58. DIG_CDC_EVENT_SSR_UP,
  59. DIG_CDC_EVENT_LAST,
  60. };