drivers/net/can/usb/etas_es58x/es581_4.h
Source file repositories/reference/linux-study-clean/drivers/net/can/usb/etas_es58x/es581_4.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/can/usb/etas_es58x/es581_4.h- Extension
.h- Size
- 5900 bytes
- Lines
- 208
- Domain
- Driver Families
- Bucket
- drivers/net
- 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/types.h
Detected Declarations
struct es581_4_tx_conf_msgstruct es581_4_tx_can_msgstruct es581_4_bulk_tx_can_msgstruct es581_4_echo_msgstruct es581_4_bulk_echo_msgstruct es581_4_rx_can_msgstruct es581_4_rx_err_msgstruct es581_4_rx_event_msgstruct es581_4_tx_ack_msgstruct es581_4_rx_cmd_retstruct es581_4_urb_cmdenum es581_4_cmd_typeenum es581_4_cmd_idenum es581_4_rx_type
Annotated Snippet
struct es581_4_tx_conf_msg {
__le32 bitrate;
__le32 sample_point;
__le32 samples_per_bit;
__le32 bit_time;
__le32 sjw;
__le32 sync_edge;
__le32 physical_layer;
__le32 echo_mode;
u8 channel_no;
} __packed;
struct es581_4_tx_can_msg {
__le32 can_id;
__le32 packet_idx;
__le16 flags;
u8 channel_no;
u8 dlc;
u8 data[CAN_MAX_DLEN];
} __packed;
/* The ES581.4 allows bulk transfer. */
struct es581_4_bulk_tx_can_msg {
u8 num_can_msg;
/* Using type "u8[]" instead of "struct es581_4_tx_can_msg[]"
* for tx_msg_buf because each member has a flexible size.
*/
u8 tx_can_msg_buf[ES581_4_TX_BULK_MAX *
sizeof(struct es581_4_tx_can_msg)];
} __packed;
struct es581_4_echo_msg {
__le64 timestamp;
__le32 packet_idx;
} __packed;
struct es581_4_bulk_echo_msg {
u8 channel_no;
struct es581_4_echo_msg echo_msg[ES581_4_ECHO_BULK_MAX];
} __packed;
/* Normal Rx CAN Message */
struct es581_4_rx_can_msg {
__le64 timestamp;
u8 rx_type; /* type enum es581_4_rx_type */
u8 flags; /* type enum es58x_flag */
u8 channel_no;
u8 dlc;
__le32 can_id;
u8 data[CAN_MAX_DLEN];
} __packed;
struct es581_4_rx_err_msg {
__le64 timestamp;
__le16 rx_type; /* type enum es581_4_rx_type */
__le16 flags; /* type enum es58x_flag */
u8 channel_no;
u8 __padding[2];
u8 dlc;
__le32 tag; /* Related to the CAN filtering. Unused in this module */
__le32 can_id;
__le32 error; /* type enum es58x_error */
__le32 destination; /* Unused in this module */
} __packed;
struct es581_4_rx_event_msg {
__le64 timestamp;
__le16 rx_type; /* type enum es581_4_rx_type */
u8 channel_no;
u8 __padding;
__le32 tag; /* Related to the CAN filtering. Unused in this module */
__le32 event; /* type enum es58x_event */
__le32 destination; /* Unused in this module */
} __packed;
struct es581_4_tx_ack_msg {
__le16 tx_free_entries; /* Number of remaining free entries in the device TX queue */
u8 channel_no;
u8 rx_cmd_ret_u8; /* type enum es58x_cmd_ret_code_u8 */
} __packed;
struct es581_4_rx_cmd_ret {
__le32 rx_cmd_ret_le32;
u8 channel_no;
u8 __padding[3];
} __packed;
/**
* struct es581_4_urb_cmd - Commands received from or sent to the
* ES581.4 device.
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct es581_4_tx_conf_msg`, `struct es581_4_tx_can_msg`, `struct es581_4_bulk_tx_can_msg`, `struct es581_4_echo_msg`, `struct es581_4_bulk_echo_msg`, `struct es581_4_rx_can_msg`, `struct es581_4_rx_err_msg`, `struct es581_4_rx_event_msg`, `struct es581_4_tx_ack_msg`, `struct es581_4_rx_cmd_ret`.
- Atlas domain: Driver Families / drivers/net.
- 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.