tlv320aic3x.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Platform data for Texas Instruments TLV320AIC3x codec
  3. *
  4. * Author: Jarkko Nikula <jarkko.nikula@bitmer.com>
  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 version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __TLV320AIC3x_H__
  11. #define __TLV320AIC3x_H__
  12. /* GPIO API */
  13. enum {
  14. AIC3X_GPIO1_FUNC_DISABLED = 0,
  15. AIC3X_GPIO1_FUNC_AUDIO_WORDCLK_ADC = 1,
  16. AIC3X_GPIO1_FUNC_CLOCK_MUX = 2,
  17. AIC3X_GPIO1_FUNC_CLOCK_MUX_DIV2 = 3,
  18. AIC3X_GPIO1_FUNC_CLOCK_MUX_DIV4 = 4,
  19. AIC3X_GPIO1_FUNC_CLOCK_MUX_DIV8 = 5,
  20. AIC3X_GPIO1_FUNC_SHORT_CIRCUIT_IRQ = 6,
  21. AIC3X_GPIO1_FUNC_AGC_NOISE_IRQ = 7,
  22. AIC3X_GPIO1_FUNC_INPUT = 8,
  23. AIC3X_GPIO1_FUNC_OUTPUT = 9,
  24. AIC3X_GPIO1_FUNC_DIGITAL_MIC_MODCLK = 10,
  25. AIC3X_GPIO1_FUNC_AUDIO_WORDCLK = 11,
  26. AIC3X_GPIO1_FUNC_BUTTON_IRQ = 12,
  27. AIC3X_GPIO1_FUNC_HEADSET_DETECT_IRQ = 13,
  28. AIC3X_GPIO1_FUNC_HEADSET_DETECT_OR_BUTTON_IRQ = 14,
  29. AIC3X_GPIO1_FUNC_ALL_IRQ = 16
  30. };
  31. enum {
  32. AIC3X_GPIO2_FUNC_DISABLED = 0,
  33. AIC3X_GPIO2_FUNC_HEADSET_DETECT_IRQ = 2,
  34. AIC3X_GPIO2_FUNC_INPUT = 3,
  35. AIC3X_GPIO2_FUNC_OUTPUT = 4,
  36. AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT = 5,
  37. AIC3X_GPIO2_FUNC_AUDIO_BITCLK = 8,
  38. AIC3X_GPIO2_FUNC_HEADSET_DETECT_OR_BUTTON_IRQ = 9,
  39. AIC3X_GPIO2_FUNC_ALL_IRQ = 10,
  40. AIC3X_GPIO2_FUNC_SHORT_CIRCUIT_OR_AGC_IRQ = 11,
  41. AIC3X_GPIO2_FUNC_HEADSET_OR_BUTTON_PRESS_OR_SHORT_CIRCUIT_IRQ = 12,
  42. AIC3X_GPIO2_FUNC_SHORT_CIRCUIT_IRQ = 13,
  43. AIC3X_GPIO2_FUNC_AGC_NOISE_IRQ = 14,
  44. AIC3X_GPIO2_FUNC_BUTTON_PRESS_IRQ = 15
  45. };
  46. enum aic3x_micbias_voltage {
  47. AIC3X_MICBIAS_OFF = 0,
  48. AIC3X_MICBIAS_2_0V = 1,
  49. AIC3X_MICBIAS_2_5V = 2,
  50. AIC3X_MICBIAS_AVDDV = 3,
  51. };
  52. struct aic3x_setup_data {
  53. unsigned int gpio_func[2];
  54. };
  55. struct aic3x_pdata {
  56. int gpio_reset; /* < 0 if not used */
  57. struct aic3x_setup_data *setup;
  58. /* Selects the micbias voltage */
  59. enum aic3x_micbias_voltage micbias_vg;
  60. };
  61. #endif