drivers/hid/hid-sony.c
Source file repositories/reference/linux-study-clean/drivers/hid/hid-sony.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hid/hid-sony.c- Extension
.c- Size
- 80380 bytes
- Lines
- 2632
- Domain
- Driver Families
- Bucket
- drivers/hid
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/device.hlinux/hid.hlinux/module.hlinux/slab.hlinux/leds.hlinux/power_supply.hlinux/spinlock.hlinux/list.hlinux/idr.hlinux/input/mt.hlinux/crc32.hlinux/usb.hlinux/timer.hlinux/unaligned.hhid-ids.h
Detected Declarations
struct sixaxis_ledstruct sixaxis_rumblestruct sixaxis_output_reportstruct motion_output_report_02struct sony_scenum sony_workerfunction sony_schedule_workfunction ghl_magic_poke_cbfunction ghl_magic_pokefunction ghl_init_urbfunction rb3_pro_instrument_enable_full_reportfunction djh_turntable_mappingfunction instrument_mappingfunction gh_guitar_mappingfunction rb4_guitar_mappingfunction ps3remote_mappingfunction navigation_mappingfunction sixaxis_mappingfunction sixaxis_parse_reportfunction nsg_mrxu_parse_reportfunction rb4_ps4_guitar_parse_reportfunction rb4_ps5_guitar_parse_reportfunction sony_raw_eventfunction sony_mappingfunction sony_register_touchpadfunction sony_register_sensorsfunction sixaxis_set_operational_usbfunction sixaxis_set_operational_btfunction sixaxis_set_leds_from_idfunction buzz_set_ledsfunction sony_set_ledsfunction sony_led_set_brightnessfunction sony_led_get_brightnessfunction sony_led_blink_setfunction sony_leds_initfunction sixaxis_send_output_reportfunction motion_send_output_reportfunction sony_send_output_reportfunction sony_state_workerfunction sony_allocate_output_reportfunction sony_play_effectfunction sony_init_fffunction sony_init_fffunction sony_battery_get_propertyfunction sony_battery_probefunction sony_compare_connection_typefunction sony_check_add_dev_listfunction list_for_each_entry
Annotated Snippet
module_init(sony_init);
module_exit(sony_exit);
MODULE_DESCRIPTION("HID driver for Sony / PS2 / PS3 BD / PS4 / PS5 devices");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/device.h`, `linux/hid.h`, `linux/module.h`, `linux/slab.h`, `linux/leds.h`, `linux/power_supply.h`, `linux/spinlock.h`, `linux/list.h`.
- Detected declarations: `struct sixaxis_led`, `struct sixaxis_rumble`, `struct sixaxis_output_report`, `struct motion_output_report_02`, `struct sony_sc`, `enum sony_worker`, `function sony_schedule_work`, `function ghl_magic_poke_cb`, `function ghl_magic_poke`, `function ghl_init_urb`.
- Atlas domain: Driver Families / drivers/hid.
- Implementation status: integration 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.