linux/drivers/soundwire/intel_auxdevice.c

// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
// Copyright(c) 2015-22 Intel Corporation.

/*
 * Soundwire Intel Manager Driver
 */

#include <linux/acpi.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/auxiliary_bus.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"
#include "intel_auxdevice.h"

#define INTEL_MASTER_SUSPEND_DELAY_MS

/*
 * debug/config flags for the Intel SoundWire Master.
 *
 * Since we may have multiple masters active, we can have up to 8
 * flags reused in each byte, with master0 using the ls-byte, etc.
 */

#define SDW_INTEL_MASTER_DISABLE_PM_RUNTIME
#define SDW_INTEL_MASTER_DISABLE_CLOCK_STOP
#define SDW_INTEL_MASTER_DISABLE_PM_RUNTIME_IDLE
#define SDW_INTEL_MASTER_DISABLE_MULTI_LINK

static int md_flags;
module_param_named(sdw_md_flags, md_flags, int, 0444);
MODULE_PARM_DESC();

struct wake_capable_part {};

static struct wake_capable_part wake_capable_list[] =;

static bool is_wake_capable(struct sdw_slave *slave)
{}

static int generic_pre_bank_switch(struct sdw_bus *bus)
{}

static int generic_post_bank_switch(struct sdw_bus *bus)
{}

static void generic_new_peripheral_assigned(struct sdw_bus *bus,
					    struct sdw_slave *slave,
					    int dev_num)
{}

static int sdw_master_read_intel_prop(struct sdw_bus *bus)
{}

static int intel_prop_read(struct sdw_bus *bus)
{}

static DEFINE_IDA(intel_peripheral_ida);

static int intel_get_device_num_ida(struct sdw_bus *bus, struct sdw_slave *slave)
{}

static void intel_put_device_num_ida(struct sdw_bus *bus, struct sdw_slave *slave)
{}

static struct sdw_master_ops sdw_intel_ops =;

/*
 * probe and init (aux_dev_id argument is required by function prototype but not used)
 */
static int intel_link_probe(struct auxiliary_device *auxdev,
			    const struct auxiliary_device_id *aux_dev_id)

{}

int intel_link_startup(struct auxiliary_device *auxdev)
{}

static void intel_link_remove(struct auxiliary_device *auxdev)
{}

int intel_link_process_wakeen_event(struct auxiliary_device *auxdev)
{}

/*
 * PM calls
 */

int intel_resume_child_device(struct device *dev, void *data)
{}

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

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

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

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

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

static const struct dev_pm_ops intel_pm =;

static const struct auxiliary_device_id intel_link_id_table[] =;
MODULE_DEVICE_TABLE(auxiliary, intel_link_id_table);

static struct auxiliary_driver sdw_intel_drv =;
module_auxiliary_driver();

MODULE_LICENSE();
MODULE_DESCRIPTION();