include/linux/can/bittiming.h
Source file repositories/reference/linux-study-clean/include/linux/can/bittiming.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/can/bittiming.h- Extension
.h- Size
- 9560 bytes
- Lines
- 281
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/netdevice.hlinux/can/netlink.h
Detected Declarations
struct can_tdcstruct can_tdc_conststruct can_pwmstruct can_pwm_conststruct data_bittiming_paramsfunction can_calc_bittimingfunction can_calc_tdcofunction can_get_relative_tdcofunction can_bit_timefunction can_bit_time_tqminfunction can_tqmin_to_ns
Annotated Snippet
struct can_tdc {
u32 tdcv;
u32 tdco;
u32 tdcf;
};
/* The transceiver decoding margin corresponds to t_Decode in ISO 11898-2 */
#define CAN_PWM_DECODE_NS 5
/* Maximum PWM symbol duration. Corresponds to t_SymbolNom_MAX - t_Decode */
#define CAN_PWM_NS_MAX (205 - CAN_PWM_DECODE_NS)
/*
* struct can_tdc_const - CAN hardware-dependent constant for
* Transmission Delay Compensation
*
* @tdcv_min: Transmitter Delay Compensation Value minimum value. If
* the controller does not support manual mode for tdcv
* (c.f. flag CAN_CTRLMODE_TDC_MANUAL) then this value is
* ignored.
* @tdcv_max: Transmitter Delay Compensation Value maximum value. If
* the controller does not support manual mode for tdcv
* (c.f. flag CAN_CTRLMODE_TDC_MANUAL) then this value is
* ignored.
*
* @tdco_min: Transmitter Delay Compensation Offset minimum value.
* @tdco_max: Transmitter Delay Compensation Offset maximum value.
* Should not be zero. If the controller does not support TDC,
* then the pointer to this structure should be NULL.
*
* @tdcf_min: Transmitter Delay Compensation Filter window minimum
* value. If @tdcf_max is zero, this value is ignored.
* @tdcf_max: Transmitter Delay Compensation Filter window maximum
* value. Should be set to zero if the controller does not
* support this feature.
*/
struct can_tdc_const {
u32 tdcv_min;
u32 tdcv_max;
u32 tdco_min;
u32 tdco_max;
u32 tdcf_min;
u32 tdcf_max;
};
/*
* struct can_pwm - CAN Pulse-Width Modulation (PWM) parameters
*
* @pwms: pulse width modulation short phase
* @pwml: pulse width modulation long phase
* @pwmo: pulse width modulation offset
*/
struct can_pwm {
u32 pwms;
u32 pwml;
u32 pwmo;
};
/*
* struct can_pwm - CAN hardware-dependent constants for Pulse-Width
* Modulation (PWM)
*
* @pwms_min: PWM short phase minimum value. Must be at least 1.
* @pwms_max: PWM short phase maximum value
* @pwml_min: PWM long phase minimum value. Must be at least 1.
* @pwml_max: PWM long phase maximum value
* @pwmo_min: PWM offset phase minimum value
* @pwmo_max: PWM offset phase maximum value
*/
struct can_pwm_const {
u32 pwms_min;
u32 pwms_max;
u32 pwml_min;
u32 pwml_max;
u32 pwmo_min;
u32 pwmo_max;
};
struct data_bittiming_params {
const struct can_bittiming_const *data_bittiming_const;
struct can_bittiming data_bittiming;
const struct can_tdc_const *tdc_const;
const struct can_pwm_const *pwm_const;
union {
struct can_tdc tdc;
struct can_pwm pwm;
};
const u32 *data_bitrate_const;
unsigned int data_bitrate_const_cnt;
int (*do_set_data_bittiming)(struct net_device *dev);
int (*do_get_auto_tdcv)(const struct net_device *dev, u32 *tdcv);
Annotation
- Immediate include surface: `linux/netdevice.h`, `linux/can/netlink.h`.
- Detected declarations: `struct can_tdc`, `struct can_tdc_const`, `struct can_pwm`, `struct can_pwm_const`, `struct data_bittiming_params`, `function can_calc_bittiming`, `function can_calc_tdco`, `function can_get_relative_tdco`, `function can_bit_time`, `function can_bit_time_tqmin`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.