wm5100.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * linux/sound/wm5100.h -- Platform data for WM5100
  3. *
  4. * Copyright 2011 Wolfson Microelectronics. PLC.
  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 __LINUX_SND_WM5100_H
  11. #define __LINUX_SND_WM5100_H
  12. enum wm5100_in_mode {
  13. WM5100_IN_SE = 0,
  14. WM5100_IN_DIFF = 1,
  15. WM5100_IN_DMIC = 2,
  16. };
  17. enum wm5100_dmic_sup {
  18. WM5100_DMIC_SUP_MICVDD = 0,
  19. WM5100_DMIC_SUP_MICBIAS1 = 1,
  20. WM5100_DMIC_SUP_MICBIAS2 = 2,
  21. WM5100_DMIC_SUP_MICBIAS3 = 3,
  22. };
  23. enum wm5100_micdet_bias {
  24. WM5100_MICDET_MICBIAS1 = 0,
  25. WM5100_MICDET_MICBIAS2 = 1,
  26. WM5100_MICDET_MICBIAS3 = 2,
  27. };
  28. struct wm5100_jack_mode {
  29. enum wm5100_micdet_bias bias;
  30. int hp_pol;
  31. int micd_src;
  32. };
  33. #define WM5100_GPIO_SET 0x10000
  34. struct wm5100_pdata {
  35. int reset; /** GPIO controlling /RESET, if any */
  36. int ldo_ena; /** GPIO controlling LODENA, if any */
  37. int hp_pol; /** GPIO controlling headset polarity, if any */
  38. int irq_flags;
  39. int gpio_base;
  40. struct wm5100_jack_mode jack_modes[2];
  41. /* Input pin mode selection */
  42. enum wm5100_in_mode in_mode[4];
  43. /* DMIC supply selection */
  44. enum wm5100_dmic_sup dmic_sup[4];
  45. int gpio_defaults[6];
  46. };
  47. #endif