drivers/hid/wacom.h
Source file repositories/reference/linux-study-clean/drivers/hid/wacom.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/hid/wacom.h- Extension
.h- Size
- 8607 bytes
- Lines
- 253
- Domain
- Driver Families
- Bucket
- drivers/hid
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/slab.hlinux/module.hlinux/mod_devicetable.hlinux/hid.hlinux/kfifo.hlinux/leds.hlinux/usb/input.hlinux/power_supply.hlinux/timer.hlinux/unaligned.h
Detected Declarations
struct wacomstruct wacom_ledstruct wacom_group_ledsstruct wacom_batterystruct wacom_remotestruct wacomstruct wacom_ledsenum wacom_workerfunction wacom_schedule_workfunction wacom_s32toufunction wacom_rescale
Annotated Snippet
struct wacom_led {
struct led_classdev cdev;
struct led_trigger trigger;
struct wacom *wacom;
unsigned int group;
unsigned int id;
u8 llv;
u8 hlv;
bool held;
};
struct wacom_group_leds {
u8 select; /* status led selector (0..3) */
struct wacom_led *leds;
unsigned int count;
struct device *dev;
};
struct wacom_battery {
struct wacom *wacom;
struct power_supply_desc bat_desc;
struct power_supply *battery;
char bat_name[WACOM_NAME_MAX];
int bat_status;
int battery_capacity;
int bat_charging;
int bat_connected;
int ps_connected;
};
struct wacom_remote {
spinlock_t remote_lock;
struct kfifo remote_fifo;
struct kobject *remote_dir;
struct {
struct attribute_group group;
u32 serial;
struct input_dev *input;
bool registered;
struct wacom_battery battery;
ktime_t active_time;
} remotes[WACOM_MAX_REMOTES];
};
struct wacom {
struct usb_device *usbdev;
struct usb_interface *intf;
struct wacom_wac wacom_wac;
struct hid_device *hdev;
struct mutex lock;
struct work_struct wireless_work;
struct work_struct battery_work;
struct work_struct remote_work;
struct delayed_work init_work;
struct delayed_work aes_battery_work;
struct wacom_remote *remote;
struct work_struct mode_change_work;
struct timer_list idleprox_timer;
bool generic_has_leds;
struct wacom_leds {
struct wacom_group_leds *groups;
unsigned int count;
u8 llv; /* status led brightness no button (1..127) */
u8 hlv; /* status led brightness button pressed (1..127) */
u8 img_lum; /* OLED matrix display brightness */
u8 max_llv; /* maximum brightness of LED (llv) */
u8 max_hlv; /* maximum brightness of LED (hlv) */
} led;
struct wacom_battery battery;
bool resources;
};
static inline void wacom_schedule_work(struct wacom_wac *wacom_wac,
enum wacom_worker which)
{
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
switch (which) {
case WACOM_WORKER_WIRELESS:
schedule_work(&wacom->wireless_work);
break;
case WACOM_WORKER_BATTERY:
schedule_work(&wacom->battery_work);
break;
case WACOM_WORKER_REMOTE:
schedule_work(&wacom->remote_work);
break;
case WACOM_WORKER_MODE_CHANGE:
schedule_work(&wacom->mode_change_work);
break;
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/slab.h`, `linux/module.h`, `linux/mod_devicetable.h`, `linux/hid.h`, `linux/kfifo.h`, `linux/leds.h`, `linux/usb/input.h`.
- Detected declarations: `struct wacom`, `struct wacom_led`, `struct wacom_group_leds`, `struct wacom_battery`, `struct wacom_remote`, `struct wacom`, `struct wacom_leds`, `enum wacom_worker`, `function wacom_schedule_work`, `function wacom_s32tou`.
- Atlas domain: Driver Families / drivers/hid.
- 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.