drivers/bluetooth/btrtl.c
Source file repositories/reference/linux-study-clean/drivers/bluetooth/btrtl.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/bluetooth/btrtl.c- Extension
.c- Size
- 40813 bytes
- Lines
- 1581
- Domain
- Driver Families
- Bucket
- drivers/bluetooth
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/module.hlinux/firmware.hlinux/unaligned.hlinux/usb.hnet/bluetooth/bluetooth.hnet/bluetooth/hci_core.hbtrtl.h
Detected Declarations
struct id_tablestruct btrtl_device_infoenum btrtl_chip_idfunction Copyrightfunction rtl_read_rom_versionfunction btrtl_vendor_read_reg16function btrtl_insert_ordered_subsecfunction list_for_each_safefunction btrtl_parse_sectionfunction rtlbt_parse_firmware_v2function rtlbt_parse_firmwarefunction rtl_download_firmwarefunction rtl_load_filefunction btrtl_setup_rtl8723afunction btrtl_setup_rtl8723bfunction btrtl_coredumpfunction btrtl_dmp_hdrfunction btrtl_register_devcoredump_supportfunction btrtl_set_driver_namefunction rtl_has_chip_typefunction rtl_read_chip_typefunction btrtl_freefunction list_for_each_entry_safefunction btrtl_download_firmwarefunction btrtl_set_quirksfunction btrtl_setup_realtekfunction btrtl_shutdown_realtekfunction btrtl_convert_baudratefunction btrtl_get_uart_settingsexport btrtl_set_driver_nameexport btrtl_freeexport btrtl_initializeexport btrtl_download_firmwareexport btrtl_set_quirksexport btrtl_setup_realtekexport btrtl_shutdown_realtekexport btrtl_get_uart_settings
Annotated Snippet
struct id_table {
__u16 match_flags;
__u16 lmp_subver;
__u16 hci_rev;
__u8 hci_ver;
__u8 hci_bus;
__u8 chip_type;
bool config_needed;
bool has_rom_version;
bool has_msft_ext;
char *fw_name;
char *cfg_name;
char *hw_info;
};
struct btrtl_device_info {
const struct id_table *ic_info;
u8 rom_version;
u8 *fw_data;
int fw_len;
u8 *cfg_data;
int cfg_len;
bool drop_fw;
int project_id;
u8 key_id;
struct list_head patch_subsecs;
};
static const struct id_table ic_id_table[] = {
/* 8723A */
{ IC_INFO(RTL_ROM_LMP_8723A, 0xb, 0x6, HCI_USB),
.config_needed = false,
.has_rom_version = false,
.fw_name = "rtl_bt/rtl8723a_fw",
.cfg_name = NULL,
.hw_info = "rtl8723au" },
/* 8723BS */
{ IC_INFO(RTL_ROM_LMP_8723B, 0xb, 0x6, HCI_UART),
.config_needed = true,
.has_rom_version = true,
.fw_name = "rtl_bt/rtl8723bs_fw",
.cfg_name = "rtl_bt/rtl8723bs_config",
.hw_info = "rtl8723bs" },
/* 8723B */
{ IC_INFO(RTL_ROM_LMP_8723B, 0xb, 0x6, HCI_USB),
.config_needed = false,
.has_rom_version = true,
.fw_name = "rtl_bt/rtl8723b_fw",
.cfg_name = "rtl_bt/rtl8723b_config",
.hw_info = "rtl8723bu" },
/* 8723CS-CG */
{ .match_flags = IC_MATCH_FL_LMPSUBV | IC_MATCH_FL_CHIP_TYPE |
IC_MATCH_FL_HCIBUS,
.lmp_subver = RTL_ROM_LMP_8703B,
.chip_type = RTL_CHIP_8723CS_CG,
.hci_bus = HCI_UART,
.config_needed = true,
.has_rom_version = true,
.fw_name = "rtl_bt/rtl8723cs_cg_fw",
.cfg_name = "rtl_bt/rtl8723cs_cg_config",
.hw_info = "rtl8723cs-cg" },
/* 8723CS-VF */
{ .match_flags = IC_MATCH_FL_LMPSUBV | IC_MATCH_FL_CHIP_TYPE |
IC_MATCH_FL_HCIBUS,
.lmp_subver = RTL_ROM_LMP_8703B,
.chip_type = RTL_CHIP_8723CS_VF,
.hci_bus = HCI_UART,
.config_needed = true,
.has_rom_version = true,
.fw_name = "rtl_bt/rtl8723cs_vf_fw",
.cfg_name = "rtl_bt/rtl8723cs_vf_config",
.hw_info = "rtl8723cs-vf" },
/* 8723CS-XX */
{ .match_flags = IC_MATCH_FL_LMPSUBV | IC_MATCH_FL_CHIP_TYPE |
IC_MATCH_FL_HCIBUS,
.lmp_subver = RTL_ROM_LMP_8703B,
.chip_type = RTL_CHIP_8723CS_XX,
.hci_bus = HCI_UART,
.config_needed = true,
.has_rom_version = true,
.fw_name = "rtl_bt/rtl8723cs_xx_fw",
.cfg_name = "rtl_bt/rtl8723cs_xx_config",
.hw_info = "rtl8723cs" },
/* 8723D */
Annotation
- Immediate include surface: `linux/module.h`, `linux/firmware.h`, `linux/unaligned.h`, `linux/usb.h`, `net/bluetooth/bluetooth.h`, `net/bluetooth/hci_core.h`, `btrtl.h`.
- Detected declarations: `struct id_table`, `struct btrtl_device_info`, `enum btrtl_chip_id`, `function Copyright`, `function rtl_read_rom_version`, `function btrtl_vendor_read_reg16`, `function btrtl_insert_ordered_subsec`, `function list_for_each_safe`, `function btrtl_parse_section`, `function rtlbt_parse_firmware_v2`.
- Atlas domain: Driver Families / drivers/bluetooth.
- Implementation status: integration 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.