include/linux/soundwire/sdw_amd.h

Source file repositories/reference/linux-study-clean/include/linux/soundwire/sdw_amd.h

File Facts

System
Linux kernel
Corpus path
include/linux/soundwire/sdw_amd.h
Extension
.h
Size
4820 bytes
Lines
179
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct acp_sdw_pdata {
	u16 instance;
	u32 acp_rev;
	/* mutex to protect acp common register access */
	struct mutex *acp_sdw_lock;
};

/**
 * struct sdw_amd_dai_runtime: AMD sdw dai runtime  data
 *
 * @name: SoundWire stream name
 * @stream: stream runtime
 * @bus: Bus handle
 * @stream_type: Stream type
 */
struct sdw_amd_dai_runtime {
	char *name;
	struct sdw_stream_runtime *stream;
	struct sdw_bus *bus;
	enum sdw_stream_type stream_type;
};

/**
 * struct amd_sdw_manager - amd manager driver context
 * @bus: bus handle
 * @dev: linux device
 * @mmio: SoundWire registers mmio base
 * @acp_mmio: acp registers mmio base
 * @amd_sdw_irq_thread: SoundWire manager irq workqueue
 * @amd_sdw_work: peripheral status work queue
 * @acp_sdw_lock: mutex to protect acp share register access
 * @status: peripheral devices status array
 * @num_din_ports: number of input ports
 * @num_dout_ports: number of output ports
 * @max_ports: total number of input ports and output ports
 * @cols_index: Column index in frame shape
 * @rows_index: Rows index in frame shape
 * @port_offset_map: dynamic array to map port block offset
 * @instance: SoundWire manager instance
 * @quirks: SoundWire manager quirks
 * @wake_en_mask: wake enable mask per SoundWire manager
 * @acp_rev: acp pci device revision id
 * @clk_stopped: flag set to true when clock is stopped
 * @power_mode_mask: flag interprets amd SoundWire manager power mode
 * @dai_runtime_array: dai runtime array
 */
struct amd_sdw_manager {
	struct sdw_bus bus;
	struct device *dev;

	void __iomem *mmio;
	void __iomem *acp_mmio;

	struct work_struct amd_sdw_irq_thread;
	struct work_struct amd_sdw_work;
	/* mutex to protect acp common register access */
	struct mutex *acp_sdw_lock;

	enum sdw_slave_status status[SDW_MAX_DEVICES + 1];

	int num_din_ports;
	int num_dout_ports;
	int max_ports;

	int cols_index;
	int rows_index;

	int *port_offset_map;
	u32 instance;
	u32 quirks;
	u32 wake_en_mask;
	u32 power_mode_mask;
	u32 acp_rev;
	bool clk_stopped;

	struct sdw_amd_dai_runtime **dai_runtime_array;
};

/**
 * struct sdw_amd_acpi_info - Soundwire AMD information found in ACPI tables
 * @handle: ACPI controller handle
 * @count: maximum no of soundwire manager links supported on AMD platform.
 * @link_mask: bit-wise mask listing links enabled by BIOS menu
 */
struct sdw_amd_acpi_info {
	acpi_handle handle;
	int count;
	u32 link_mask;
};

Annotation

Implementation Notes