#include <linux/completion.h>
#include <linux/cleanup.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_registers.h>
#include <linux/pm_runtime.h>
#include <linux/wait.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include "bus.h"
#include "amd_init.h"
#include "amd_manager.h"
#define DRV_NAME …
#define to_amd_sdw(b) …
static int amd_init_sdw_manager(struct amd_sdw_manager *amd_manager)
{ … }
static int amd_enable_sdw_manager(struct amd_sdw_manager *amd_manager)
{ … }
static int amd_disable_sdw_manager(struct amd_sdw_manager *amd_manager)
{ … }
static void amd_enable_sdw_interrupts(struct amd_sdw_manager *amd_manager)
{ … }
static void amd_disable_sdw_interrupts(struct amd_sdw_manager *amd_manager)
{ … }
static int amd_deinit_sdw_manager(struct amd_sdw_manager *amd_manager)
{ … }
static void amd_sdw_set_frameshape(struct amd_sdw_manager *amd_manager)
{ … }
static void amd_sdw_wake_enable(struct amd_sdw_manager *amd_manager, bool enable)
{ … }
static void amd_sdw_ctl_word_prep(u32 *lower_word, u32 *upper_word, struct sdw_msg *msg,
int cmd_offset)
{ … }
static u64 amd_sdw_send_cmd_get_resp(struct amd_sdw_manager *amd_manager, u32 lower_data,
u32 upper_data)
{ … }
static enum sdw_command_response
amd_program_scp_addr(struct amd_sdw_manager *amd_manager, struct sdw_msg *msg)
{ … }
static int amd_prep_msg(struct amd_sdw_manager *amd_manager, struct sdw_msg *msg)
{ … }
static enum sdw_command_response amd_sdw_fill_msg_resp(struct amd_sdw_manager *amd_manager,
struct sdw_msg *msg, u64 response,
int offset)
{ … }
static unsigned int _amd_sdw_xfer_msg(struct amd_sdw_manager *amd_manager, struct sdw_msg *msg,
int cmd_offset)
{ … }
static enum sdw_command_response amd_sdw_xfer_msg(struct sdw_bus *bus, struct sdw_msg *msg)
{ … }
static void amd_sdw_fill_slave_status(struct amd_sdw_manager *amd_manager, u16 index, u32 status)
{ … }
static void amd_sdw_process_ping_status(u64 response, struct amd_sdw_manager *amd_manager)
{ … }
static void amd_sdw_read_and_process_ping_status(struct amd_sdw_manager *amd_manager)
{ … }
static u32 amd_sdw_read_ping_status(struct sdw_bus *bus)
{ … }
static int amd_sdw_compute_params(struct sdw_bus *bus)
{ … }
static int amd_sdw_port_params(struct sdw_bus *bus, struct sdw_port_params *p_params,
unsigned int bank)
{ … }
static int amd_sdw_transport_params(struct sdw_bus *bus,
struct sdw_transport_params *params,
enum sdw_reg_bank bank)
{ … }
static int amd_sdw_port_enable(struct sdw_bus *bus,
struct sdw_enable_ch *enable_ch,
unsigned int bank)
{ … }
static int sdw_master_read_amd_prop(struct sdw_bus *bus)
{ … }
static int amd_prop_read(struct sdw_bus *bus)
{ … }
static const struct sdw_master_port_ops amd_sdw_port_ops = …;
static const struct sdw_master_ops amd_sdw_ops = …;
static int amd_sdw_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int amd_sdw_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{ … }
static int amd_set_sdw_stream(struct snd_soc_dai *dai, void *stream, int direction)
{ … }
static int amd_pcm_set_sdw_stream(struct snd_soc_dai *dai, void *stream, int direction)
{ … }
static void *amd_get_sdw_stream(struct snd_soc_dai *dai, int direction)
{ … }
static const struct snd_soc_dai_ops amd_sdw_dai_ops = …;
static const struct snd_soc_component_driver amd_sdw_dai_component = …;
static int amd_sdw_register_dais(struct amd_sdw_manager *amd_manager)
{ … }
static void amd_sdw_update_slave_status_work(struct work_struct *work)
{ … }
static void amd_sdw_update_slave_status(u32 status_change_0to7, u32 status_change_8to11,
struct amd_sdw_manager *amd_manager)
{ … }
static void amd_sdw_process_wake_event(struct amd_sdw_manager *amd_manager)
{ … }
static void amd_sdw_irq_thread(struct work_struct *work)
{ … }
int amd_sdw_manager_start(struct amd_sdw_manager *amd_manager)
{ … }
static int amd_sdw_manager_probe(struct platform_device *pdev)
{ … }
static void amd_sdw_manager_remove(struct platform_device *pdev)
{ … }
static int amd_sdw_clock_stop(struct amd_sdw_manager *amd_manager)
{ … }
static int amd_sdw_clock_stop_exit(struct amd_sdw_manager *amd_manager)
{ … }
static int amd_resume_child_device(struct device *dev, void *data)
{ … }
static int __maybe_unused amd_pm_prepare(struct device *dev)
{ … }
static int __maybe_unused amd_suspend(struct device *dev)
{ … }
static int __maybe_unused amd_suspend_runtime(struct device *dev)
{ … }
static int __maybe_unused amd_resume_runtime(struct device *dev)
{ … }
static const struct dev_pm_ops amd_pm = …;
static struct platform_driver amd_sdw_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;