wm5100.h 935 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * linux/sound/wm5100.h -- Platform data for WM5100
  4. *
  5. * Copyright 2011 Wolfson Microelectronics. PLC.
  6. */
  7. #ifndef __LINUX_SND_WM5100_H
  8. #define __LINUX_SND_WM5100_H
  9. enum wm5100_in_mode {
  10. WM5100_IN_SE = 0,
  11. WM5100_IN_DIFF = 1,
  12. WM5100_IN_DMIC = 2,
  13. };
  14. enum wm5100_dmic_sup {
  15. WM5100_DMIC_SUP_MICVDD = 0,
  16. WM5100_DMIC_SUP_MICBIAS1 = 1,
  17. WM5100_DMIC_SUP_MICBIAS2 = 2,
  18. WM5100_DMIC_SUP_MICBIAS3 = 3,
  19. };
  20. enum wm5100_micdet_bias {
  21. WM5100_MICDET_MICBIAS1 = 0,
  22. WM5100_MICDET_MICBIAS2 = 1,
  23. WM5100_MICDET_MICBIAS3 = 2,
  24. };
  25. struct wm5100_jack_mode {
  26. enum wm5100_micdet_bias bias;
  27. int hp_pol;
  28. int micd_src;
  29. };
  30. #define WM5100_GPIO_SET 0x10000
  31. struct wm5100_pdata {
  32. int irq_flags;
  33. struct wm5100_jack_mode jack_modes[2];
  34. /* Input pin mode selection */
  35. enum wm5100_in_mode in_mode[4];
  36. /* DMIC supply selection */
  37. enum wm5100_dmic_sup dmic_sup[4];
  38. int gpio_defaults[6];
  39. };
  40. #endif