drivers/input/mouse/cyapa_gen5.c
Source file repositories/reference/linux-study-clean/drivers/input/mouse/cyapa_gen5.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/mouse/cyapa_gen5.c- Extension
.c- Size
- 85146 bytes
- Lines
- 2910
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/delay.hlinux/i2c.hlinux/input.hlinux/input/mt.hlinux/mutex.hlinux/completion.hlinux/slab.hlinux/unaligned.hlinux/crc-itu-t.hlinux/pm_runtime.hcyapa.h
Detected Declarations
struct cyapa_pip_touch_recordstruct cyapa_pip_report_datastruct cyapa_tsg_bin_image_headstruct cyapa_tsg_bin_image_data_recordstruct cyapa_tsg_bin_imagestruct pip_bl_packet_startstruct pip_bl_packet_endstruct pip_bl_cmd_headstruct pip_bl_initiate_cmd_datastruct tsg_bl_metadata_row_paramsstruct tsg_bl_flash_row_headstruct pip_app_cmd_headstruct gen5_app_set_parameter_datastruct gen5_app_get_parameter_datastruct gen5_retrieve_panel_scan_datafunction cyapa_pip_cmd_state_initializefunction cyapa_i2c_pip_readfunction cyapa_i2c_pip_writefunction cyapa_set_pip_pm_statefunction cyapa_reset_pip_pm_statefunction cyapa_get_pip_pm_statefunction cyapa_empty_pip_output_datafunction funcfunction cyapa_do_i2c_pip_cmd_irq_syncfunction cyapa_do_i2c_pip_cmd_pollingfunction cyapa_i2c_pip_cmd_irq_syncfunction cyapa_sort_tsg_pip_bl_resp_datafunction cyapa_sort_tsg_pip_app_resp_datafunction cyapa_sort_pip_application_launch_datafunction cyapa_sort_gen5_hid_descriptor_datafunction cyapa_sort_pip_deep_sleep_datafunction gen5_idle_state_parsefunction gen5_hid_description_header_parsefunction gen5_report_data_header_parsefunction gen5_cmd_resp_header_parsefunction cyapa_gen5_state_parsefunction cyapa_get_image_record_data_numfunction cyapa_pip_bl_initiatefunction cyapa_sort_pip_bl_exit_datafunction cyapa_pip_bl_exitfunction cyapa_pip_bl_enterfunction cyapa_pip_fw_head_checkfunction cyapa_pip_check_fwfunction cyapa_pip_write_fw_blockfunction cyapa_pip_do_fw_updatefunction cyapa_gen5_change_power_statefunction cyapa_gen5_set_interval_timefunction cyapa_gen5_get_interval_time
Annotated Snippet
struct cyapa_pip_touch_record {
/*
* Bit 7 - 3: reserved
* Bit 2 - 0: touch type;
* 0 : standard finger;
* 1 : proximity (Start supported in Gen5 TP).
* 2 : finger hover (defined, but not used yet.)
* 3 - 15 : reserved.
*/
u8 touch_type;
/*
* Bit 7: indicates touch liftoff status.
* 0 : touch is currently on the panel.
* 1 : touch record indicates a liftoff.
* Bit 6 - 5: indicates an event associated with this touch instance
* 0 : no event
* 1 : touchdown
* 2 : significant displacement (> active distance)
* 3 : liftoff (record reports last known coordinates)
* Bit 4 - 0: An arbitrary ID tag associated with a finger
* to allow tracking a touch as it moves around the panel.
*/
u8 touch_tip_event_id;
/* Bit 7 - 0 of X-axis coordinate of the touch in pixel. */
u8 x_lo;
/* Bit 15 - 8 of X-axis coordinate of the touch in pixel. */
u8 x_hi;
/* Bit 7 - 0 of Y-axis coordinate of the touch in pixel. */
u8 y_lo;
/* Bit 15 - 8 of Y-axis coordinate of the touch in pixel. */
u8 y_hi;
/*
* The meaning of this value is different when touch_type is different.
* For standard finger type:
* Touch intensity in counts, pressure value.
* For proximity type (Start supported in Gen5 TP):
* The distance, in surface units, between the contact and
* the surface.
**/
u8 z;
/*
* The length of the major axis of the ellipse of contact between
* the finger and the panel (ABS_MT_TOUCH_MAJOR).
*/
u8 major_axis_len;
/*
* The length of the minor axis of the ellipse of contact between
* the finger and the panel (ABS_MT_TOUCH_MINOR).
*/
u8 minor_axis_len;
/*
* The length of the major axis of the approaching tool.
* (ABS_MT_WIDTH_MAJOR)
*/
u8 major_tool_len;
/*
* The length of the minor axis of the approaching tool.
* (ABS_MT_WIDTH_MINOR)
*/
u8 minor_tool_len;
/*
* The angle between the panel vertical axis and
* the major axis of the contact ellipse. This value is an 8-bit
* signed integer. The range is -127 to +127 (corresponding to
* -90 degree and +90 degree respectively).
* The positive direction is clockwise from the vertical axis.
* If the ellipse of contact degenerates into a circle,
* orientation is reported as 0.
*/
u8 orientation;
} __packed;
struct cyapa_pip_report_data {
u8 report_head[PIP_TOUCH_REPORT_HEAD_SIZE];
struct cyapa_pip_touch_record touch_records[10];
} __packed;
struct cyapa_tsg_bin_image_head {
u8 head_size; /* Unit: bytes, including itself. */
Annotation
- Immediate include surface: `linux/delay.h`, `linux/i2c.h`, `linux/input.h`, `linux/input/mt.h`, `linux/mutex.h`, `linux/completion.h`, `linux/slab.h`, `linux/unaligned.h`.
- Detected declarations: `struct cyapa_pip_touch_record`, `struct cyapa_pip_report_data`, `struct cyapa_tsg_bin_image_head`, `struct cyapa_tsg_bin_image_data_record`, `struct cyapa_tsg_bin_image`, `struct pip_bl_packet_start`, `struct pip_bl_packet_end`, `struct pip_bl_cmd_head`, `struct pip_bl_initiate_cmd_data`, `struct tsg_bl_metadata_row_params`.
- Atlas domain: Driver Families / drivers/input.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.