linux/sound/soc/codecs/cs42l42-sdw.c

// SPDX-License-Identifier: GPL-2.0-only
// cs42l42-sdw.c -- CS42L42 ALSA SoC audio driver SoundWire driver
//
// Copyright (C) 2022 Cirrus Logic, Inc. and
//                    Cirrus Logic International Semiconductor Ltd.

#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/gpio/consumer.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/of_irq.h>
#include <linux/pm_runtime.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_registers.h>
#include <linux/soundwire/sdw_type.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/sdw.h>
#include <sound/soc.h>

#include "cs42l42.h"

#define CS42L42_SDW_CAPTURE_PORT
#define CS42L42_SDW_PLAYBACK_PORT

/* Register addresses are offset when sent over SoundWire */
#define CS42L42_SDW_ADDR_OFFSET

#define CS42L42_SDW_MEM_ACCESS_STATUS
#define CS42L42_SDW_MEM_READ_DATA

#define CS42L42_SDW_LAST_LATE
#define CS42L42_SDW_CMD_IN_PROGRESS
#define CS42L42_SDW_RDATA_RDY

#define CS42L42_DELAYED_READ_POLL_US
#define CS42L42_DELAYED_READ_TIMEOUT_US

static const struct snd_soc_dapm_route cs42l42_sdw_audio_map[] =;

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

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

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

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

static int cs42l42_sdw_port_prep(struct sdw_slave *slave,
				 struct sdw_prepare_ch *prepare_ch,
				 enum sdw_port_prep_ops state)
{}

static int cs42l42_sdw_dai_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
					  int direction)
{}

static void cs42l42_sdw_dai_shutdown(struct snd_pcm_substream *substream,
				     struct snd_soc_dai *dai)
{}

static const struct snd_soc_dai_ops cs42l42_sdw_dai_ops =;

static struct snd_soc_dai_driver cs42l42_sdw_dai =;

static int cs42l42_sdw_poll_status(struct sdw_slave *peripheral, u8 mask, u8 match)
{}

static int cs42l42_sdw_read(void *context, unsigned int reg, unsigned int *val)
{}

static int cs42l42_sdw_write(void *context, unsigned int reg, unsigned int val)
{}

/* Initialise cs42l42 using SoundWire - this is only called once, during initialisation */
static void cs42l42_sdw_init(struct sdw_slave *peripheral)
{}

static int cs42l42_sdw_read_prop(struct sdw_slave *peripheral)
{}

static int cs42l42_sdw_update_status(struct sdw_slave *peripheral,
				     enum sdw_slave_status status)
{}

static int cs42l42_sdw_bus_config(struct sdw_slave *peripheral,
				  struct sdw_bus_params *params)
{}

static const struct sdw_slave_ops cs42l42_sdw_ops =;

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

static const struct reg_sequence __maybe_unused cs42l42_soft_reboot_seq[] =;

static int __maybe_unused cs42l42_sdw_handle_unattach(struct cs42l42_private *cs42l42)
{}

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

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

static int cs42l42_sdw_probe(struct sdw_slave *peripheral, const struct sdw_device_id *id)
{}

static int cs42l42_sdw_remove(struct sdw_slave *peripheral)
{}

static const struct dev_pm_ops cs42l42_sdw_pm =;

static const struct sdw_device_id cs42l42_sdw_id[] =;
MODULE_DEVICE_TABLE(sdw, cs42l42_sdw_id);

static struct sdw_driver cs42l42_sdw_driver =;

module_sdw_driver();

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