cs35l35.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. * linux/sound/cs35l35.h -- Platform data for CS35l35
  3. *
  4. * Copyright (c) 2016 Cirrus Logic Inc.
  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 __CS35L35_H
  11. #define __CS35L35_H
  12. struct classh_cfg {
  13. /*
  14. * Class H Algorithm Control Variables
  15. * You can either have it done
  16. * automatically or you can adjust
  17. * these variables for tuning
  18. *
  19. * if you do not enable the internal algorithm
  20. * you will get a set of mixer controls for
  21. * Class H tuning
  22. *
  23. * Section 4.3 of the datasheet
  24. */
  25. bool classh_bst_override;
  26. bool classh_algo_enable;
  27. int classh_bst_max_limit;
  28. int classh_mem_depth;
  29. int classh_release_rate;
  30. int classh_headroom;
  31. int classh_wk_fet_disable;
  32. int classh_wk_fet_delay;
  33. int classh_wk_fet_thld;
  34. int classh_vpch_auto;
  35. int classh_vpch_rate;
  36. int classh_vpch_man;
  37. };
  38. struct monitor_cfg {
  39. /*
  40. * Signal Monitor Data
  41. * highly configurable signal monitoring
  42. * data positioning and different types of
  43. * monitoring data.
  44. *
  45. * Section 4.8.2 - 4.8.4 of the datasheet
  46. */
  47. bool is_present;
  48. bool imon_specs;
  49. bool vmon_specs;
  50. bool vpmon_specs;
  51. bool vbstmon_specs;
  52. bool vpbrstat_specs;
  53. bool zerofill_specs;
  54. u8 imon_dpth;
  55. u8 imon_loc;
  56. u8 imon_frm;
  57. u8 imon_scale;
  58. u8 vmon_dpth;
  59. u8 vmon_loc;
  60. u8 vmon_frm;
  61. u8 vpmon_dpth;
  62. u8 vpmon_loc;
  63. u8 vpmon_frm;
  64. u8 vbstmon_dpth;
  65. u8 vbstmon_loc;
  66. u8 vbstmon_frm;
  67. u8 vpbrstat_dpth;
  68. u8 vpbrstat_loc;
  69. u8 vpbrstat_frm;
  70. u8 zerofill_dpth;
  71. u8 zerofill_loc;
  72. u8 zerofill_frm;
  73. };
  74. struct cs35l35_platform_data {
  75. /* Stereo (2 Device) */
  76. bool stereo;
  77. /* serial port drive strength */
  78. int sp_drv_str;
  79. /* serial port drive in unused slots */
  80. int sp_drv_unused;
  81. /* Boost Power Down with FET */
  82. bool bst_pdn_fet_on;
  83. /* Boost Voltage : used if ClassH Algo Enabled */
  84. int bst_vctl;
  85. /* Boost Converter Peak Current CTRL */
  86. int bst_ipk;
  87. /* Amp Gain Zero Cross */
  88. bool gain_zc;
  89. /* Audio Input Location */
  90. int aud_channel;
  91. /* Advisory Input Location */
  92. int adv_channel;
  93. /* Shared Boost for stereo */
  94. bool shared_bst;
  95. /* Specifies this amp is using an external boost supply */
  96. bool ext_bst;
  97. /* Inductor Value */
  98. int boost_ind;
  99. /* ClassH Algorithm */
  100. struct classh_cfg classh_algo;
  101. /* Monitor Config */
  102. struct monitor_cfg mon_cfg;
  103. };
  104. #endif /* __CS35L35_H */