drivers/gpib/agilent_82357a/agilent_82357a.h

Source file repositories/reference/linux-study-clean/drivers/gpib/agilent_82357a/agilent_82357a.h

File Facts

System
Linux kernel
Corpus path
drivers/gpib/agilent_82357a/agilent_82357a.h
Extension
.h
Size
4234 bytes
Lines
183
Domain
Driver Families
Bucket
drivers/gpib
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct agilent_82357a_urb_ctx {
	struct completion complete;
	unsigned timed_out : 1;
};

// struct which defines local data for each 82357 device
struct agilent_82357a_priv {
	struct usb_interface *bus_interface;
	unsigned short eos_char;
	unsigned short eos_mode;
	unsigned short hw_control_bits;
	unsigned long interrupt_flags;
	struct urb *bulk_urb;
	struct urb *interrupt_urb;
	u8 *interrupt_buffer;
	struct mutex bulk_transfer_lock;	// bulk transfer lock
	struct mutex bulk_alloc_lock;		// bulk transfer allocation lock
	struct mutex interrupt_alloc_lock;	// interrupt allocation lock
	struct mutex control_alloc_lock;	// control message allocation lock
	struct timer_list bulk_timer;
	struct agilent_82357a_urb_ctx context;
	unsigned int bulk_out_endpoint;
	unsigned int interrupt_in_endpoint;
	unsigned is_cic : 1;
	unsigned ren_state : 1;
};

struct agilent_82357a_register_pairlet {
	short address;
	unsigned short value;
};

enum firmware_registers {
	HW_CONTROL = 0xa,
	LED_CONTROL = 0xb,
	RESET_TO_POWERUP = 0xc,
	PROTOCOL_CONTROL = 0xd,
	FAST_TALKER_T1 = 0xe
};

enum hardware_control_bits {
	NOT_TI_RESET = 0x1,
	SYSTEM_CONTROLLER = 0x2,
	NOT_PARALLEL_POLL = 0x4,
	OSCILLATOR_5V_ON = 0x8,
	OUTPUT_5V_ON = 0x20,
	CPLD_3V_ON = 0x80,
};

enum led_control_bits {
	FIRMWARE_LED_CONTROL = 0x1,
	FAIL_LED_ON = 0x20,
	READY_LED_ON = 0x40,
	ACCESS_LED_ON = 0x80
};

enum reset_to_powerup_bits {
	RESET_SPACEBALL = 0x1,	// wait 2 millisec after sending
};

enum protocol_control_bits {
	WRITE_COMPLETE_INTERRUPT_EN = 0x1,
};

static const int agilent_82357a_control_request = 0x4;

Annotation

Implementation Notes