drivers/input/rmi4/rmi_f34v7.c
Source file repositories/reference/linux-study-clean/drivers/input/rmi4/rmi_f34v7.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/rmi4/rmi_f34v7.c- Extension
.c- Size
- 29486 bytes
- Lines
- 1187
- Domain
- Driver Families
- Bucket
- drivers/input
- 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/bitops.hlinux/kernel.hlinux/rmi.hlinux/firmware.hlinux/delay.hlinux/slab.hlinux/jiffies.hlinux/unaligned.hrmi_driver.hrmi_f34.h
Detected Declarations
function Copyrightfunction rmi_f34v7_wait_for_idlefunction rmi_f34v7_check_command_statusfunction rmi_f34v7_write_command_single_transactionfunction rmi_f34v7_write_commandfunction rmi_f34v7_write_partition_idfunction rmi_f34v7_read_partition_tablefunction rmi_f34v7_parse_partition_tablefunction rmi_f34v7_read_queries_bl_versionfunction rmi_f34v7_read_queriesfunction rmi_f34v7_check_bl_config_sizefunction rmi_f34v7_erase_allfunction rmi_f34v7_read_blocksfunction rmi_f34v7_write_f34v7_blocksfunction rmi_f34v7_write_configfunction rmi_f34v7_write_ui_configfunction rmi_f34v7_write_dp_configfunction rmi_f34v7_write_guest_codefunction rmi_f34v7_write_flash_configfunction rmi_f34v7_write_partition_tablefunction rmi_f34v7_write_firmwarefunction rmi_f34v7_parse_img_header_10_bl_containerfunction rmi_f34v7_parse_image_header_10function rmi_f34v7_parse_image_infofunction rmi_f34v7_do_reflashfunction rmi_f34v7_enter_flash_progfunction rmi_f34v7_start_reflashfunction rmi_f34v7_probe
Annotated Snippet
switch (ptable->partition_id & 0x1f) {
case CORE_CODE_PARTITION:
blkcount->ui_firmware = partition_length;
phyaddr->ui_firmware = physical_address;
rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev,
"%s: Core code block count: %d\n",
__func__, blkcount->ui_firmware);
break;
case CORE_CONFIG_PARTITION:
blkcount->ui_config = partition_length;
phyaddr->ui_config = physical_address;
rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev,
"%s: Core config block count: %d\n",
__func__, blkcount->ui_config);
break;
case DISPLAY_CONFIG_PARTITION:
blkcount->dp_config = partition_length;
phyaddr->dp_config = physical_address;
rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev,
"%s: Display config block count: %d\n",
__func__, blkcount->dp_config);
break;
case FLASH_CONFIG_PARTITION:
blkcount->fl_config = partition_length;
rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev,
"%s: Flash config block count: %d\n",
__func__, blkcount->fl_config);
break;
case GUEST_CODE_PARTITION:
blkcount->guest_code = partition_length;
phyaddr->guest_code = physical_address;
rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev,
"%s: Guest code block count: %d\n",
__func__, blkcount->guest_code);
break;
case GUEST_SERIALIZATION_PARTITION:
blkcount->pm_config = partition_length;
rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev,
"%s: Guest serialization block count: %d\n",
__func__, blkcount->pm_config);
break;
case GLOBAL_PARAMETERS_PARTITION:
blkcount->bl_config = partition_length;
rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev,
"%s: Global parameters block count: %d\n",
__func__, blkcount->bl_config);
break;
case DEVICE_CONFIG_PARTITION:
blkcount->lockdown = partition_length;
rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev,
"%s: Device config block count: %d\n",
__func__, blkcount->lockdown);
break;
}
}
}
static int rmi_f34v7_read_queries_bl_version(struct f34_data *f34)
{
int ret;
u8 base;
int offset;
u8 query_0;
struct f34v7_query_1_7 query_1_7;
base = f34->fn->fd.query_base_addr;
ret = rmi_read_block(f34->fn->rmi_dev,
base,
&query_0,
sizeof(query_0));
if (ret < 0) {
dev_err(&f34->fn->dev,
"%s: Failed to read query 0\n", __func__);
return ret;
}
offset = (query_0 & 0x7) + 1;
ret = rmi_read_block(f34->fn->rmi_dev,
base + offset,
&query_1_7,
sizeof(query_1_7));
if (ret < 0) {
dev_err(&f34->fn->dev, "%s: Failed to read queries 1 to 7\n",
__func__);
return ret;
}
f34->bootloader_id[0] = query_1_7.bl_minor_revision;
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/kernel.h`, `linux/rmi.h`, `linux/firmware.h`, `linux/delay.h`, `linux/slab.h`, `linux/jiffies.h`, `linux/unaligned.h`.
- Detected declarations: `function Copyright`, `function rmi_f34v7_wait_for_idle`, `function rmi_f34v7_check_command_status`, `function rmi_f34v7_write_command_single_transaction`, `function rmi_f34v7_write_command`, `function rmi_f34v7_write_partition_id`, `function rmi_f34v7_read_partition_table`, `function rmi_f34v7_parse_partition_table`, `function rmi_f34v7_read_queries_bl_version`, `function rmi_f34v7_read_queries`.
- Atlas domain: Driver Families / drivers/input.
- 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.