drivers/net/can/usb/etas_es58x/es58x_fd.h
Source file repositories/reference/linux-study-clean/drivers/net/can/usb/etas_es58x/es58x_fd.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/can/usb/etas_es58x/es58x_fd.h- Extension
.h- Size
- 7802 bytes
- Lines
- 235
- 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 es58x_fd_bittimingstruct es58x_fd_tx_conf_msgstruct es58x_fd_tx_can_msgstruct es58x_fd_rx_can_msgstruct es58x_fd_echo_msgstruct es58x_fd_rx_event_msgstruct es58x_fd_tx_ack_msgstruct es58x_fd_urb_cmdenum es58x_fd_cmd_typeenum es58x_fd_can_cmd_idenum es58x_fd_dev_cmd_idenum es58x_fd_ctrlmode
Annotated Snippet
struct es58x_fd_bittiming {
__le32 bitrate;
__le16 tseg1; /* range: [tseg1_min-1..tseg1_max-1] */
__le16 tseg2; /* range: [tseg2_min-1..tseg2_max-1] */
__le16 brp; /* range: [brp_min-1..brp_max-1] */
__le16 sjw; /* range: [0..sjw_max-1] */
} __packed;
/**
* struct es58x_fd_tx_conf_msg - Channel configuration.
* @nominal_bittiming: Nominal bittiming.
* @samples_per_bit: type enum es58x_samples_per_bit.
* @sync_edge: type enum es58x_sync_edge.
* @physical_layer: type enum es58x_physical_layer.
* @echo_mode: type enum es58x_echo_mode.
* @ctrlmode: type enum es58x_fd_ctrlmode.
* @canfd_enabled: boolean (0: Classical CAN, 1: CAN and/or CANFD).
* @data_bittiming: Bittiming for flexible data-rate transmission.
* @tdc_enabled: Transmitter Delay Compensation switch (0: TDC is
* disabled, 1: TDC is enabled).
* @tdco: Transmitter Delay Compensation Offset.
* @tdcf: Transmitter Delay Compensation Filter window.
*
* Please refer to the microcontroller datasheet: "SAM E70/S70/V70/V71
* Family" section 49 "Controller Area Network (MCAN)" for additional
* information.
*/
struct es58x_fd_tx_conf_msg {
struct es58x_fd_bittiming nominal_bittiming;
u8 samples_per_bit;
u8 sync_edge;
u8 physical_layer;
u8 echo_mode;
u8 ctrlmode;
u8 canfd_enabled;
struct es58x_fd_bittiming data_bittiming;
u8 tdc_enabled;
__le16 tdco;
__le16 tdcf;
} __packed;
#define ES58X_FD_CAN_CONF_LEN \
(offsetof(struct es58x_fd_tx_conf_msg, canfd_enabled))
#define ES58X_FD_CANFD_CONF_LEN (sizeof(struct es58x_fd_tx_conf_msg))
struct es58x_fd_tx_can_msg {
u8 packet_idx;
__le32 can_id;
u8 flags;
union {
u8 dlc; /* Only if cmd_id is ES58X_FD_CMD_TYPE_CAN */
u8 len; /* Only if cmd_id is ES58X_FD_CMD_TYPE_CANFD */
} __packed;
u8 data[CANFD_MAX_DLEN];
} __packed;
#define ES58X_FD_CAN_TX_LEN \
(offsetof(struct es58x_fd_tx_can_msg, data[CAN_MAX_DLEN]))
#define ES58X_FD_CANFD_TX_LEN (sizeof(struct es58x_fd_tx_can_msg))
struct es58x_fd_rx_can_msg {
__le64 timestamp;
__le32 can_id;
u8 flags;
union {
u8 dlc; /* Only if cmd_id is ES58X_FD_CMD_TYPE_CAN */
u8 len; /* Only if cmd_id is ES58X_FD_CMD_TYPE_CANFD */
} __packed;
u8 data[CANFD_MAX_DLEN];
} __packed;
#define ES58X_FD_CAN_RX_LEN \
(offsetof(struct es58x_fd_rx_can_msg, data[CAN_MAX_DLEN]))
#define ES58X_FD_CANFD_RX_LEN (sizeof(struct es58x_fd_rx_can_msg))
struct es58x_fd_echo_msg {
__le64 timestamp;
u8 packet_idx;
} __packed;
struct es58x_fd_rx_event_msg {
__le64 timestamp;
__le32 can_id;
u8 flags; /* type enum es58x_flag */
u8 error_type; /* 0: event, 1: error */
u8 error_code;
u8 event_code;
} __packed;
struct es58x_fd_tx_ack_msg {
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct es58x_fd_bittiming`, `struct es58x_fd_tx_conf_msg`, `struct es58x_fd_tx_can_msg`, `struct es58x_fd_rx_can_msg`, `struct es58x_fd_echo_msg`, `struct es58x_fd_rx_event_msg`, `struct es58x_fd_tx_ack_msg`, `struct es58x_fd_urb_cmd`, `enum es58x_fd_cmd_type`, `enum es58x_fd_can_cmd_id`.
- 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.