3 * socketcan/can/ioctl.h
5 * Definitions for CAN controller setup (work in progress)
9 * Send feedback to <linux-can@vger.kernel.org>
16 #include <linux/sockios.h>
21 #define CAN_BITRATE_UNCONFIGURED ((__u32) 0xFFFFFFFFU)
22 #define CAN_BITRATE_UNKNOWN 0
23 #define CAN_BITRATE_DEFAULT 500000
33 /* TSEG1 of controllers usually is a sum of synch_seg (always 1),
34 * prop_seg and phase_seg1, TSEG2 = phase_seg2 */
36 struct can_bittime_std {
37 __u32 brp; /* baud rate prescaler */
38 __u8 prop_seg; /* from 1 to 8 */
39 __u8 phase_seg1; /* from 1 to 8 */
40 __u8 phase_seg2; /* from 1 to 8 */
41 __u8 sjw:7; /* from 1 to 4 */
42 __u8 sam:1; /* 1 - enable triple sampling */
45 struct can_bittime_btr {
51 enum can_bittimes type;
53 struct can_bittime_std std;
54 struct can_bittime_btr btr;
70 #define CAN_CTRLMODE_LOOPBACK 0x1
71 #define CAN_CTRLMODE_LISTENONLY 0x2
74 * CAN operational and error states
78 CAN_STATE_BUS_WARNING,
79 CAN_STATE_BUS_PASSIVE,
86 * CAN device statistics
88 struct can_device_stats {
96 int bus_error_at_init;
99 #endif /* CAN_IOCTL_H */