Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0
0002  *
0003  * cs35l41.h -- CS35L41 ALSA SoC audio driver
0004  *
0005  * Copyright 2017-2021 Cirrus Logic, Inc.
0006  *
0007  * Author: David Rhodes <david.rhodes@cirrus.com>
0008  */
0009 
0010 #ifndef __CS35L41_H__
0011 #define __CS35L41_H__
0012 
0013 #include <linux/gpio/consumer.h>
0014 #include <linux/regulator/consumer.h>
0015 #include <linux/firmware.h>
0016 #include <sound/core.h>
0017 #include <sound/cs35l41.h>
0018 
0019 #include "wm_adsp.h"
0020 
0021 #define CS35L41_RX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
0022 #define CS35L41_TX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
0023 
0024 extern const struct dev_pm_ops cs35l41_pm_ops;
0025 
0026 struct cs35l41_private {
0027     struct wm_adsp dsp; /* needs to be first member */
0028     struct snd_soc_codec *codec;
0029     struct cs35l41_hw_cfg hw_cfg;
0030     struct device *dev;
0031     struct regmap *regmap;
0032     struct regulator_bulk_data supplies[CS35L41_NUM_SUPPLIES];
0033     int irq;
0034     /* GPIO for /RST */
0035     struct gpio_desc *reset_gpio;
0036 };
0037 
0038 int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *hw_cfg);
0039 void cs35l41_remove(struct cs35l41_private *cs35l41);
0040 
0041 #endif /*__CS35L41_H__*/