linux/sound/soc/codecs/cs35l33.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * cs35l33.c -- CS35L33 ALSA SoC audio driver
 *
 * Copyright 2016 Cirrus Logic, Inc.
 *
 * Author: Paul Handrigan <[email protected]>
 */
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/platform_device.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include <linux/gpio/consumer.h>
#include <sound/cs35l33.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/regulator/machine.h>
#include <linux/of.h>

#include "cs35l33.h"
#include "cirrus_legacy.h"

#define CS35L33_BOOT_DELAY

struct cs35l33_private {};

static const struct reg_default cs35l33_reg[] =;

static const struct reg_sequence cs35l33_patch[] =;

static bool cs35l33_volatile_register(struct device *dev, unsigned int reg)
{}

static bool cs35l33_writeable_register(struct device *dev, unsigned int reg)
{}

static bool cs35l33_readable_register(struct device *dev, unsigned int reg)
{}

static DECLARE_TLV_DB_SCALE(classd_ctl_tlv, 900, 100, 0);
static DECLARE_TLV_DB_SCALE(dac_tlv, -10200, 50, 0);

static const struct snd_kcontrol_new cs35l33_snd_controls[] =;

static int cs35l33_spkrdrv_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static int cs35l33_sdin_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static int cs35l33_sdout_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{}

static const struct snd_soc_dapm_widget cs35l33_dapm_widgets[] =;

static const struct snd_soc_dapm_route cs35l33_audio_map[] =;

static const struct snd_soc_dapm_route cs35l33_vphg_auto_route[] =;

static const struct snd_soc_dapm_route cs35l33_vp_vbst_mon_route[] =;

static int cs35l33_set_bias_level(struct snd_soc_component *component,
				  enum snd_soc_bias_level level)
{}

struct cs35l33_mclk_div {};

static const struct cs35l33_mclk_div cs35l33_mclk_coeffs[] =;

static int cs35l33_get_mclk_coeff(int mclk, int srate)
{}

static int cs35l33_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{}

static int cs35l33_pcm_hw_params(struct snd_pcm_substream *substream,
				 struct snd_pcm_hw_params *params,
				 struct snd_soc_dai *dai)
{}

static const unsigned int cs35l33_src_rates[] =;

static const struct snd_pcm_hw_constraint_list cs35l33_constraints =;

static int cs35l33_pcm_startup(struct snd_pcm_substream *substream,
			       struct snd_soc_dai *dai)
{}

static int cs35l33_set_tristate(struct snd_soc_dai *dai, int tristate)
{}

static int cs35l33_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
				unsigned int rx_mask, int slots, int slot_width)
{}

static int cs35l33_component_set_sysclk(struct snd_soc_component *component,
		int clk_id, int source, unsigned int freq, int dir)
{}

static const struct snd_soc_dai_ops cs35l33_ops =;

static struct snd_soc_dai_driver cs35l33_dai =;

static int cs35l33_set_hg_data(struct snd_soc_component *component,
			       struct cs35l33_pdata *pdata)
{}

static int cs35l33_set_bst_ipk(struct snd_soc_component *component, unsigned int bst)
{}

static int cs35l33_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_component_dev_cs35l33 =;

static const struct regmap_config cs35l33_regmap =;

static int __maybe_unused cs35l33_runtime_resume(struct device *dev)
{}

static int __maybe_unused cs35l33_runtime_suspend(struct device *dev)
{}

static const struct dev_pm_ops cs35l33_pm_ops =;

static int cs35l33_get_hg_data(const struct device_node *np,
			       struct cs35l33_pdata *pdata)
{}

static irqreturn_t cs35l33_irq_thread(int irq, void *data)
{}

static const char * const cs35l33_core_supplies[] =;

static int cs35l33_of_get_pdata(struct device *dev,
				struct cs35l33_private *cs35l33)
{}

static int cs35l33_i2c_probe(struct i2c_client *i2c_client)
{}

static void cs35l33_i2c_remove(struct i2c_client *client)
{}

static const struct of_device_id cs35l33_of_match[] =;
MODULE_DEVICE_TABLE(of, cs35l33_of_match);

static const struct i2c_device_id cs35l33_id[] =;

MODULE_DEVICE_TABLE(i2c, cs35l33_id);

static struct i2c_driver cs35l33_i2c_driver =;
module_i2c_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();