cs35l41.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0
  2. *
  3. * cs35l41.h -- CS35L41 ALSA SoC audio driver
  4. *
  5. * Copyright 2017-2021 Cirrus Logic, Inc.
  6. *
  7. * Author: David Rhodes <[email protected]>
  8. */
  9. #ifndef __CS35L41_H__
  10. #define __CS35L41_H__
  11. #include <linux/gpio/consumer.h>
  12. #include <linux/regulator/consumer.h>
  13. #include <linux/firmware.h>
  14. #include <sound/core.h>
  15. #include <sound/cs35l41.h>
  16. #include "wm_adsp.h"
  17. #define CS35L41_RX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
  18. #define CS35L41_TX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
  19. extern const struct dev_pm_ops cs35l41_pm_ops;
  20. struct cs35l41_private {
  21. struct wm_adsp dsp; /* needs to be first member */
  22. struct snd_soc_codec *codec;
  23. struct cs35l41_hw_cfg hw_cfg;
  24. struct device *dev;
  25. struct regmap *regmap;
  26. struct regulator_bulk_data supplies[CS35L41_NUM_SUPPLIES];
  27. int irq;
  28. /* GPIO for /RST */
  29. struct gpio_desc *reset_gpio;
  30. };
  31. int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *hw_cfg);
  32. void cs35l41_remove(struct cs35l41_private *cs35l41);
  33. #endif /*__CS35L41_H__*/