wm5100.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 reset; /** GPIO controlling /RESET, if any */
  33. int ldo_ena; /** GPIO controlling LODENA, if any */
  34. int hp_pol; /** GPIO controlling headset polarity, if any */
  35. int irq_flags;
  36. int gpio_base;
  37. struct wm5100_jack_mode jack_modes[2];
  38. /* Input pin mode selection */
  39. enum wm5100_in_mode in_mode[4];
  40. /* DMIC supply selection */
  41. enum wm5100_dmic_sup dmic_sup[4];
  42. int gpio_defaults[6];
  43. };
  44. #endif