16450ef55SDavid Rhodes /* SPDX-License-Identifier: GPL-2.0 26450ef55SDavid Rhodes * 36450ef55SDavid Rhodes * cs35l41.h -- CS35L41 ALSA SoC audio driver 46450ef55SDavid Rhodes * 56450ef55SDavid Rhodes * Copyright 2017-2021 Cirrus Logic, Inc. 66450ef55SDavid Rhodes * 76450ef55SDavid Rhodes * Author: David Rhodes <david.rhodes@cirrus.com> 86450ef55SDavid Rhodes */ 96450ef55SDavid Rhodes 106450ef55SDavid Rhodes #ifndef __CS35L41_H__ 116450ef55SDavid Rhodes #define __CS35L41_H__ 126450ef55SDavid Rhodes 136450ef55SDavid Rhodes #include <linux/gpio/consumer.h> 146450ef55SDavid Rhodes #include <linux/regulator/consumer.h> 15bae9e13fSDavid Rhodes #include <linux/firmware.h> 166450ef55SDavid Rhodes #include <sound/core.h> 176450ef55SDavid Rhodes #include <sound/cs35l41.h> 186450ef55SDavid Rhodes 19bae9e13fSDavid Rhodes #include "wm_adsp.h" 20bae9e13fSDavid Rhodes 216450ef55SDavid Rhodes #define CS35L41_RX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE) 226450ef55SDavid Rhodes #define CS35L41_TX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE) 236450ef55SDavid Rhodes 24f517ba49SCharles Keepax extern const struct dev_pm_ops cs35l41_pm_ops; 25f517ba49SCharles Keepax 266450ef55SDavid Rhodes struct cs35l41_private { 27bae9e13fSDavid Rhodes struct wm_adsp dsp; /* needs to be first member */ 286450ef55SDavid Rhodes struct snd_soc_codec *codec; 29*f7f20737SLucas Tanure struct cs35l41_hw_cfg hw_cfg; 306450ef55SDavid Rhodes struct device *dev; 316450ef55SDavid Rhodes struct regmap *regmap; 326450ef55SDavid Rhodes struct regulator_bulk_data supplies[CS35L41_NUM_SUPPLIES]; 336450ef55SDavid Rhodes int irq; 346450ef55SDavid Rhodes /* GPIO for /RST */ 356450ef55SDavid Rhodes struct gpio_desc *reset_gpio; 366450ef55SDavid Rhodes }; 376450ef55SDavid Rhodes 38*f7f20737SLucas Tanure int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *hw_cfg); 39ca7270a7SUwe Kleine-König void cs35l41_remove(struct cs35l41_private *cs35l41); 406450ef55SDavid Rhodes 416450ef55SDavid Rhodes #endif /*__CS35L41_H__*/ 42