#include <linux/acpi.h>
#include <linux/cleanup.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <sound/pcm_params.h>
#include <linux/pm_runtime.h>
#include <sound/soc.h>
#include <linux/soundwire/sdw_registers.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_intel.h>
#include "cadence_master.h"
#include "bus.h"
#include "intel.h"
static int intel_wait_bit(void __iomem *base, int offset, u32 mask, u32 target)
{ … }
static int intel_clear_bit(void __iomem *base, int offset, u32 value, u32 mask)
{ … }
static int intel_set_bit(void __iomem *base, int offset, u32 value, u32 mask)
{ … }
#ifdef CONFIG_DEBUG_FS
#define RD_BUF …
static ssize_t intel_sprintf(void __iomem *mem, bool l,
char *buf, size_t pos, unsigned int reg)
{ … }
static int intel_reg_show(struct seq_file *s_file, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int intel_set_m_datamode(void *data, u64 value)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int intel_set_s_datamode(void *data, u64 value)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static void intel_debugfs_init(struct sdw_intel *sdw)
{ … }
static void intel_debugfs_exit(struct sdw_intel *sdw)
{ … }
#else
static void intel_debugfs_init(struct sdw_intel *sdw) {}
static void intel_debugfs_exit(struct sdw_intel *sdw) {}
#endif
static void intel_shim_glue_to_master_ip(struct sdw_intel *sdw)
{ … }
static void intel_shim_master_ip_to_glue(struct sdw_intel *sdw)
{ … }
static void intel_shim_init(struct sdw_intel *sdw)
{ … }
static int intel_shim_check_wake(struct sdw_intel *sdw)
{ … }
static void intel_shim_wake(struct sdw_intel *sdw, bool wake_enable)
{ … }
static bool intel_check_cmdsync_unlocked(struct sdw_intel *sdw)
{ … }
static int intel_link_power_up(struct sdw_intel *sdw)
{ … }
static int intel_link_power_down(struct sdw_intel *sdw)
{ … }
static void intel_shim_sync_arm(struct sdw_intel *sdw)
{ … }
static int intel_shim_sync_go_unlocked(struct sdw_intel *sdw)
{ … }
static int intel_shim_sync_go(struct sdw_intel *sdw)
{ … }
static void intel_pdi_init(struct sdw_intel *sdw,
struct sdw_cdns_stream_config *config)
{ … }
static int
intel_pdi_get_ch_cap(struct sdw_intel *sdw, unsigned int pdi_num)
{ … }
static int intel_pdi_get_ch_update(struct sdw_intel *sdw,
struct sdw_cdns_pdi *pdi,
unsigned int num_pdi,
unsigned int *num_ch)
{ … }
static int intel_pdi_stream_ch_update(struct sdw_intel *sdw,
struct sdw_cdns_streams *stream)
{ … }
static void
intel_pdi_shim_configure(struct sdw_intel *sdw, struct sdw_cdns_pdi *pdi)
{ … }
static void
intel_pdi_alh_configure(struct sdw_intel *sdw, struct sdw_cdns_pdi *pdi)
{ … }
static int intel_params_stream(struct sdw_intel *sdw,
struct snd_pcm_substream *substream,
struct snd_soc_dai *dai,
struct snd_pcm_hw_params *hw_params,
int link_id, int alh_stream_id)
{ … }
static int intel_free_stream(struct sdw_intel *sdw,
struct snd_pcm_substream *substream,
struct snd_soc_dai *dai,
int link_id)
{ … }
static int intel_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int intel_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int
intel_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{ … }
static int intel_pcm_set_sdw_stream(struct snd_soc_dai *dai,
void *stream, int direction)
{ … }
static void *intel_get_sdw_stream(struct snd_soc_dai *dai,
int direction)
{ … }
static int intel_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai)
{ … }
static int intel_component_probe(struct snd_soc_component *component)
{ … }
static int intel_component_dais_suspend(struct snd_soc_component *component)
{ … }
static const struct snd_soc_dai_ops intel_pcm_dai_ops = …;
static const struct snd_soc_component_driver dai_component = …;
static int intel_create_dai(struct sdw_cdns *cdns,
struct snd_soc_dai_driver *dais,
enum intel_pdi_type type,
u32 num, u32 off, u32 max_ch)
{ … }
static int intel_register_dai(struct sdw_intel *sdw)
{ … }
const struct sdw_intel_hw_ops sdw_intel_cnl_hw_ops = …;
EXPORT_SYMBOL_NS(…);