drivers/input/touchscreen/hideep.c
Source file repositories/reference/linux-study-clean/drivers/input/touchscreen/hideep.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/touchscreen/hideep.c- Extension
.c- Size
- 26234 bytes
- Lines
- 1122
- 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.
- 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/module.hlinux/of.hlinux/firmware.hlinux/delay.hlinux/gpio/consumer.hlinux/i2c.hlinux/acpi.hlinux/interrupt.hlinux/regmap.hlinux/sysfs.hlinux/input.hlinux/input/mt.hlinux/input/touchscreen.hlinux/regulator/consumer.hlinux/unaligned.h
Detected Declarations
struct hideep_eventstruct dwz_infostruct pgm_packetstruct hideep_tsfunction hideep_pgm_w_memfunction hideep_pgm_r_memfunction hideep_pgm_r_regfunction hideep_pgm_w_regfunction hideep_pgm_setfunction hideep_pgm_get_patternfunction hideep_enter_pgmfunction hideep_nvm_unlockfunction hideep_check_statusfunction hideep_program_pagefunction hideep_program_nvmfunction hideep_verify_nvmfunction hideep_load_dwzfunction hideep_flash_firmwarefunction hideep_update_firmwarefunction hideep_power_onfunction hideep_power_offfunction hideep_report_slotfunction hideep_parse_and_reportfunction hideep_irqfunction hideep_get_axis_infofunction hideep_init_inputfunction hideep_update_fwfunction scoped_guardfunction hideep_fw_version_showfunction hideep_product_id_showfunction hideep_set_work_modefunction hideep_suspendfunction hideep_resumefunction hideep_probe
Annotated Snippet
struct hideep_event {
__le16 x;
__le16 y;
__le16 z;
u8 w;
u8 flag;
u8 type;
u8 index;
};
struct dwz_info {
__be32 code_start;
u8 code_crc[12];
__be32 c_code_start;
__be16 gen_ver;
__be16 c_code_len;
__be32 vr_start;
__be16 rsv0;
__be16 vr_len;
__be32 ft_start;
__be16 vr_version;
__be16 ft_len;
__be16 core_ver;
__be16 boot_ver;
__be16 release_ver;
__be16 custom_ver;
u8 factory_id;
u8 panel_type;
u8 model_name[6];
__be16 extra_option;
__be16 product_code;
__be16 vendor_id;
__be16 product_id;
};
struct pgm_packet {
struct {
u8 unused[3];
u8 len;
__be32 addr;
} header;
__be32 payload[HIDEEP_NVM_PAGE_SIZE / sizeof(__be32)];
};
#define HIDEEP_XFER_BUF_SIZE sizeof(struct pgm_packet)
struct hideep_ts {
struct i2c_client *client;
struct input_dev *input_dev;
struct regmap *reg;
struct touchscreen_properties prop;
struct gpio_desc *reset_gpio;
struct regulator *vcc_vdd;
struct regulator *vcc_vid;
struct mutex dev_mutex;
u32 tch_count;
u32 lpm_count;
/*
* Data buffer to read packet from the device (contacts and key
* states). We align it on double-word boundary to keep word-sized
* fields in contact data and double-word-sized fields in program
* packet aligned.
*/
u8 xfer_buf[HIDEEP_XFER_BUF_SIZE] __aligned(4);
int key_num;
u32 key_codes[HIDEEP_KEY_MAX];
struct dwz_info dwz_info;
unsigned int fw_size;
u32 nvm_mask;
};
static int hideep_pgm_w_mem(struct hideep_ts *ts, u32 addr,
const __be32 *data, size_t count)
Annotation
- Immediate include surface: `linux/module.h`, `linux/of.h`, `linux/firmware.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/acpi.h`, `linux/interrupt.h`.
- Detected declarations: `struct hideep_event`, `struct dwz_info`, `struct pgm_packet`, `struct hideep_ts`, `function hideep_pgm_w_mem`, `function hideep_pgm_r_mem`, `function hideep_pgm_r_reg`, `function hideep_pgm_w_reg`, `function hideep_pgm_set`, `function hideep_pgm_get_pattern`.
- Atlas domain: Driver Families / drivers/input.
- Implementation status: source 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.