1 /* SPDX-License-Identifier: GPL-2.0 1 /* SPDX-License-Identifier: GPL-2.0 2 * 2 * 3 * cs35l41.h -- CS35L41 ALSA SoC audio driver 3 * cs35l41.h -- CS35L41 ALSA SoC audio driver 4 * 4 * 5 * Copyright 2017-2021 Cirrus Logic, Inc. 5 * Copyright 2017-2021 Cirrus Logic, Inc. 6 * 6 * 7 * Author: David Rhodes <david.rhodes@cirrus.c 7 * Author: David Rhodes <david.rhodes@cirrus.com> 8 */ 8 */ 9 9 10 #ifndef __CS35L41_H__ 10 #ifndef __CS35L41_H__ 11 #define __CS35L41_H__ 11 #define __CS35L41_H__ 12 12 13 #include <linux/gpio/consumer.h> 13 #include <linux/gpio/consumer.h> 14 #include <linux/regulator/consumer.h> 14 #include <linux/regulator/consumer.h> 15 #include <linux/firmware.h> 15 #include <linux/firmware.h> 16 #include <sound/core.h> 16 #include <sound/core.h> 17 #include <sound/cs35l41.h> 17 #include <sound/cs35l41.h> 18 18 19 #include "wm_adsp.h" 19 #include "wm_adsp.h" 20 20 21 #define CS35L41_RX_FORMATS (SNDRV_PCM_FMTBIT_S 21 #define CS35L41_RX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE) 22 #define CS35L41_TX_FORMATS (SNDRV_PCM_FMTBIT_S 22 #define CS35L41_TX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE) 23 23 24 extern const struct dev_pm_ops cs35l41_pm_ops; 24 extern const struct dev_pm_ops cs35l41_pm_ops; 25 25 26 struct cs35l41_private { 26 struct cs35l41_private { 27 struct wm_adsp dsp; /* needs to be fir 27 struct wm_adsp dsp; /* needs to be first member */ 28 struct snd_soc_codec *codec; 28 struct snd_soc_codec *codec; 29 struct cs35l41_hw_cfg hw_cfg; 29 struct cs35l41_hw_cfg hw_cfg; 30 struct device *dev; 30 struct device *dev; 31 struct regmap *regmap; 31 struct regmap *regmap; 32 struct regulator_bulk_data supplies[CS 32 struct regulator_bulk_data supplies[CS35L41_NUM_SUPPLIES]; 33 int irq; 33 int irq; 34 /* GPIO for /RST */ 34 /* GPIO for /RST */ 35 struct gpio_desc *reset_gpio; 35 struct gpio_desc *reset_gpio; 36 }; 36 }; 37 37 38 int cs35l41_probe(struct cs35l41_private *cs35 38 int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *hw_cfg); 39 void cs35l41_remove(struct cs35l41_private *cs 39 void cs35l41_remove(struct cs35l41_private *cs35l41); 40 40 41 #endif /*__CS35L41_H__*/ 41 #endif /*__CS35L41_H__*/ 42 42
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.