drivers/input/touchscreen/goodix_berlin_core.c
Source file repositories/reference/linux-study-clean/drivers/input/touchscreen/goodix_berlin_core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/touchscreen/goodix_berlin_core.c- Extension
.c- Size
- 20537 bytes
- Lines
- 811
- Domain
- Driver Families
- Bucket
- drivers/input
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/bitfield.hlinux/export.hlinux/gpio/consumer.hlinux/input.hlinux/input/mt.hlinux/input/touchscreen.hlinux/property.hlinux/regmap.hlinux/regulator/consumer.hlinux/sizes.hlinux/unaligned.hgoodix_berlin.h
Detected Declarations
struct goodix_berlin_fw_versionstruct goodix_berlin_ic_info_versionstruct goodix_berlin_ic_info_featurestruct goodix_berlin_ic_info_miscstruct goodix_berlin_touchstruct goodix_berlin_headerstruct goodix_berlin_eventstruct goodix_berlin_corefunction goodix_berlin_checksum_validfunction goodix_berlin_is_dummy_datafunction goodix_berlin_dev_confirmfunction goodix_berlin_power_onfunction goodix_berlin_power_offfunction goodix_berlin_read_versionfunction goodix_berlin_parse_ic_infofunction goodix_berlin_get_ic_infofunction goodix_berlin_get_remaining_contactsfunction goodix_berlin_report_statefunction goodix_berlin_touch_handlerfunction goodix_berlin_request_handle_resetfunction goodix_berlin_irqfunction goodix_berlin_input_dev_configfunction goodix_berlin_suspendfunction goodix_berlin_resumefunction goodix_berlin_power_off_actfunction registers_readfunction registers_writefunction goodix_berlin_probeexport goodix_berlin_groupsexport goodix_berlin_probe
Annotated Snippet
struct goodix_berlin_fw_version {
u8 rom_pid[6];
u8 rom_vid[3];
u8 rom_vid_reserved;
u8 patch_pid[8];
u8 patch_vid[4];
u8 patch_vid_reserved;
u8 sensor_id;
u8 reserved[2];
__le16 checksum;
};
struct goodix_berlin_ic_info_version {
u8 info_customer_id;
u8 info_version_id;
u8 ic_die_id;
u8 ic_version_id;
__le32 config_id;
u8 config_version;
u8 frame_data_customer_id;
u8 frame_data_version_id;
u8 touch_data_customer_id;
u8 touch_data_version_id;
u8 reserved[3];
} __packed;
struct goodix_berlin_ic_info_feature {
__le16 freqhop_feature;
__le16 calibration_feature;
__le16 gesture_feature;
__le16 side_touch_feature;
__le16 stylus_feature;
} __packed;
struct goodix_berlin_ic_info_misc {
__le32 cmd_addr;
__le16 cmd_max_len;
__le32 cmd_reply_addr;
__le16 cmd_reply_len;
__le32 fw_state_addr;
__le16 fw_state_len;
__le32 fw_buffer_addr;
__le16 fw_buffer_max_len;
__le32 frame_data_addr;
__le16 frame_data_head_len;
__le16 fw_attr_len;
__le16 fw_log_len;
u8 pack_max_num;
u8 pack_compress_version;
__le16 stylus_struct_len;
__le16 mutual_struct_len;
__le16 self_struct_len;
__le16 noise_struct_len;
__le32 touch_data_addr;
__le16 touch_data_head_len;
__le16 point_struct_len;
__le16 reserved1;
__le16 reserved2;
__le32 mutual_rawdata_addr;
__le32 mutual_diffdata_addr;
__le32 mutual_refdata_addr;
__le32 self_rawdata_addr;
__le32 self_diffdata_addr;
__le32 self_refdata_addr;
__le32 iq_rawdata_addr;
__le32 iq_refdata_addr;
__le32 im_rawdata_addr;
__le16 im_readata_len;
__le32 noise_rawdata_addr;
__le16 noise_rawdata_len;
__le32 stylus_rawdata_addr;
__le16 stylus_rawdata_len;
__le32 noise_data_addr;
__le32 esd_addr;
} __packed;
struct goodix_berlin_touch {
u8 status;
u8 reserved;
__le16 x;
__le16 y;
__le16 w;
};
#define GOODIX_BERLIN_TOUCH_SIZE sizeof(struct goodix_berlin_touch)
struct goodix_berlin_header {
u8 status;
u8 reserved1;
u8 request_type;
u8 reserved2[3];
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/export.h`, `linux/gpio/consumer.h`, `linux/input.h`, `linux/input/mt.h`, `linux/input/touchscreen.h`, `linux/property.h`, `linux/regmap.h`.
- Detected declarations: `struct goodix_berlin_fw_version`, `struct goodix_berlin_ic_info_version`, `struct goodix_berlin_ic_info_feature`, `struct goodix_berlin_ic_info_misc`, `struct goodix_berlin_touch`, `struct goodix_berlin_header`, `struct goodix_berlin_event`, `struct goodix_berlin_core`, `function goodix_berlin_checksum_valid`, `function goodix_berlin_is_dummy_data`.
- Atlas domain: Driver Families / drivers/input.
- Implementation status: integration implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.