wm8904.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Platform data for WM8904
  3. *
  4. * Copyright 2009 Wolfson Microelectronics PLC.
  5. *
  6. * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the
  10. * Free Software Foundation; either version 2 of the License, or (at your
  11. * option) any later version.
  12. *
  13. */
  14. #ifndef __MFD_WM8994_PDATA_H__
  15. #define __MFD_WM8994_PDATA_H__
  16. #define WM8904_DRC_REGS 4
  17. #define WM8904_EQ_REGS 25
  18. /**
  19. * DRC configurations are specified with a label and a set of register
  20. * values to write (the enable bits will be ignored). At runtime an
  21. * enumerated control will be presented for each DRC block allowing
  22. * the user to choose the configration to use.
  23. *
  24. * Configurations may be generated by hand or by using the DRC control
  25. * panel provided by the WISCE - see http://www.wolfsonmicro.com/wisce/
  26. * for details.
  27. */
  28. struct wm8904_drc_cfg {
  29. const char *name;
  30. u16 regs[WM8904_DRC_REGS];
  31. };
  32. /**
  33. * ReTune Mobile configurations are specified with a label, sample
  34. * rate and set of values to write (the enable bits will be ignored).
  35. *
  36. * Configurations are expected to be generated using the ReTune Mobile
  37. * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/
  38. */
  39. struct wm8904_retune_mobile_cfg {
  40. const char *name;
  41. unsigned int rate;
  42. u16 regs[WM8904_EQ_REGS];
  43. };
  44. struct wm8904_pdata {
  45. int num_drc_cfgs;
  46. struct wm8904_drc_cfg *drc_cfgs;
  47. int num_retune_mobile_cfgs;
  48. struct wm8904_retune_mobile_cfg *retune_mobile_cfgs;
  49. };
  50. #endif