wm8996.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * linux/sound/wm8996.h -- Platform data for WM8996
  4. *
  5. * Copyright 2011 Wolfson Microelectronics. PLC.
  6. */
  7. #ifndef __LINUX_SND_WM8996_H
  8. #define __LINUX_SND_WM8996_H
  9. enum wm8996_inmode {
  10. WM8996_DIFFERRENTIAL_1 = 0, /* IN1xP - IN1xN */
  11. WM8996_INVERTING = 1, /* IN1xN */
  12. WM8996_NON_INVERTING = 2, /* IN1xP */
  13. WM8996_DIFFERENTIAL_2 = 3, /* IN2xP - IN2xP */
  14. };
  15. /**
  16. * ReTune Mobile configurations are specified with a label, sample
  17. * rate and set of values to write (the enable bits will be ignored).
  18. *
  19. * Configurations are expected to be generated using the ReTune Mobile
  20. * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/
  21. */
  22. struct wm8996_retune_mobile_config {
  23. const char *name;
  24. int rate;
  25. u16 regs[20];
  26. };
  27. #define WM8996_SET_DEFAULT 0x10000
  28. struct wm8996_pdata {
  29. int irq_flags; /** Set IRQ trigger flags; default active low */
  30. int ldo_ena; /** GPIO for LDO1; -1 for none */
  31. int micdet_def; /** Default MICDET_SRC/HP1FB_SRC/MICD_BIAS */
  32. enum wm8996_inmode inl_mode;
  33. enum wm8996_inmode inr_mode;
  34. u32 spkmute_seq; /** Value for register 0x802 */
  35. int gpio_base;
  36. u32 gpio_default[5];
  37. int num_retune_mobile_cfgs;
  38. struct wm8996_retune_mobile_config *retune_mobile_cfgs;
  39. };
  40. #endif