drivers/soundwire/intel_auxdevice.c
Source file repositories/reference/linux-study-clean/drivers/soundwire/intel_auxdevice.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/soundwire/intel_auxdevice.c- Extension
.c- Size
- 23445 bytes
- Lines
- 875
- Domain
- Driver Families
- Bucket
- drivers/soundwire
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/debugfs.hlinux/delay.hlinux/module.hlinux/interrupt.hlinux/io.hlinux/auxiliary_bus.hsound/pcm_params.hlinux/pm_runtime.hsound/soc.hlinux/soundwire/sdw_registers.hlinux/soundwire/sdw.hlinux/soundwire/sdw_intel.hcadence_master.hbus.hintel.hintel_auxdevice.h
Detected Declarations
struct wake_capable_partfunction is_wake_capablefunction generic_bpt_send_asyncfunction generic_bpt_waitfunction generic_pre_bank_switchfunction generic_post_bank_switchfunction generic_new_peripheral_assignedfunction sdw_master_read_intel_propfunction intel_prop_readfunction intel_get_device_num_idafunction intel_put_device_num_idafunction initfunction intel_link_startupfunction intel_link_removefunction intel_link_process_wakeen_eventfunction intel_resume_child_devicefunction intel_pm_preparefunction intel_suspendfunction intel_suspend_runtimefunction intel_resumefunction intel_resume_runtime
Annotated Snippet
struct wake_capable_part {
const u16 mfg_id;
const u16 part_id;
};
static struct wake_capable_part wake_capable_list[] = {
{0x01fa, 0x4243},
{0x01fa, 0x4245},
{0x01fa, 0x4249},
{0x01fa, 0x4747},
{0x025d, 0x5682},
{0x025d, 0x700},
{0x025d, 0x711},
{0x025d, 0x1712},
{0x025d, 0x1713},
{0x025d, 0x1716},
{0x025d, 0x1717},
{0x025d, 0x712},
{0x025d, 0x713},
{0x025d, 0x714},
{0x025d, 0x715},
{0x025d, 0x716},
{0x025d, 0x717},
{0x025d, 0x721},
{0x025d, 0x722},
};
static bool is_wake_capable(struct sdw_slave *slave)
{
int i;
for (i = 0; i < ARRAY_SIZE(wake_capable_list); i++)
if (slave->id.part_id == wake_capable_list[i].part_id &&
slave->id.mfg_id == wake_capable_list[i].mfg_id)
return true;
return false;
}
static int generic_bpt_send_async(struct sdw_bus *bus, struct sdw_slave *slave,
struct sdw_bpt_msg *msg)
{
struct sdw_cdns *cdns = bus_to_cdns(bus);
struct sdw_intel *sdw = cdns_to_intel(cdns);
if (sdw->link_res->hw_ops->bpt_send_async)
return sdw->link_res->hw_ops->bpt_send_async(sdw, slave, msg);
return -EOPNOTSUPP;
}
static int generic_bpt_wait(struct sdw_bus *bus, struct sdw_slave *slave, struct sdw_bpt_msg *msg)
{
struct sdw_cdns *cdns = bus_to_cdns(bus);
struct sdw_intel *sdw = cdns_to_intel(cdns);
if (sdw->link_res->hw_ops->bpt_wait)
return sdw->link_res->hw_ops->bpt_wait(sdw, slave, msg);
return -EOPNOTSUPP;
}
static int generic_pre_bank_switch(struct sdw_bus *bus)
{
struct sdw_cdns *cdns = bus_to_cdns(bus);
struct sdw_intel *sdw = cdns_to_intel(cdns);
return sdw->link_res->hw_ops->pre_bank_switch(sdw);
}
static int generic_post_bank_switch(struct sdw_bus *bus)
{
struct sdw_cdns *cdns = bus_to_cdns(bus);
struct sdw_intel *sdw = cdns_to_intel(cdns);
return sdw->link_res->hw_ops->post_bank_switch(sdw);
}
static void generic_new_peripheral_assigned(struct sdw_bus *bus,
struct sdw_slave *slave,
int dev_num)
{
struct sdw_cdns *cdns = bus_to_cdns(bus);
struct sdw_intel *sdw = cdns_to_intel(cdns);
int dev_num_min;
int dev_num_max;
bool wake_capable = slave->prop.wake_capable || is_wake_capable(slave);
if (wake_capable) {
dev_num_min = SDW_INTEL_DEV_NUM_IDA_MIN;
dev_num_max = SDW_MAX_DEVICES;
} else {
dev_num_min = 1;
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/debugfs.h`, `linux/delay.h`, `linux/module.h`, `linux/interrupt.h`, `linux/io.h`, `linux/auxiliary_bus.h`, `sound/pcm_params.h`.
- Detected declarations: `struct wake_capable_part`, `function is_wake_capable`, `function generic_bpt_send_async`, `function generic_bpt_wait`, `function generic_pre_bank_switch`, `function generic_post_bank_switch`, `function generic_new_peripheral_assigned`, `function sdw_master_read_intel_prop`, `function intel_prop_read`, `function intel_get_device_num_ida`.
- Atlas domain: Driver Families / drivers/soundwire.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.