Lines Matching defs:can

24  *   error frames (see uapi/linux/can/error.h) and sends it using the
28 #include <linux/can.h>
29 #include <linux/can/dev.h>
30 #include <linux/can/error.h>
79 /* start the can transceiver - val defines the operation mode */
81 /* cancel pending transmissions and stop the can transceiver */
83 /* send can transceiver into low-power sleep mode */
85 /* wake up can transceiver from low-power sleep mode */
87 /* reset the can transceiver */
89 /* get piece of info from the can transceiver - subcmd defines what
276 struct can_priv can;
282 /* lock for can->echo_skb (used around
452 up->can.clock.freq = le32_to_cpu(device_info->freq);
466 up->can.ctrlmode_supported = 0;
469 up->can.ctrlmode_supported |= CAN_CTRLMODE_LOOPBACK;
471 up->can.ctrlmode_supported |= CAN_CTRLMODE_LISTENONLY;
473 up->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
475 up->can.ctrlmode_supported |= CAN_CTRLMODE_ONE_SHOT;
477 up->can.ctrlmode_supported |= CAN_CTRLMODE_BERR_REPORTING;
481 * Returns true if the can state has changed.
487 enum can_state new_state = up->can.state;
489 struct can_device_stats *can_stats = &up->can.can_stats;
532 if (up->can.state == new_state)
536 if (up->can.state > new_state) {
537 up->can.state = new_state;
542 up->can.state = new_state;
560 /* Callback on reception of a can frame via the IN endpoint
588 if (!(up->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) &&
613 /* fill the can frame */
982 if (up->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
984 if (up->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
986 if (up->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES)
988 if (up->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT)
1016 up->can.state = CAN_STATE_ERROR_ACTIVE;
1110 /* callback when Linux needs to send a can frame */
1138 /* put the skb on can loopback stack */
1200 up->can.state = CAN_STATE_STOPPED;
1208 /* stop and reset can device */
1253 cmd_set_bittiming->tq = cpu_to_le32(up->can.bittiming.tq);
1254 cmd_set_bittiming->brp = cpu_to_le16(up->can.bittiming.brp);
1256 cpu_to_le16(up->can.bittiming.sample_point);
1257 cmd_set_bittiming->prop_seg = up->can.bittiming.prop_seg;
1258 cmd_set_bittiming->phase_seg1 = up->can.bittiming.phase_seg1;
1259 cmd_set_bittiming->phase_seg2 = up->can.bittiming.phase_seg2;
1260 cmd_set_bittiming->sjw = up->can.bittiming.sjw;
1268 * Called when the user runs "ip link set can1 type can restart".
1281 up->can.state = CAN_STATE_ERROR_ACTIVE;
1283 /* check if queue can be restarted,
1512 up->can.state = CAN_STATE_STOPPED;
1513 up->can.bittiming_const = &up->device_info.bittiming_const;
1514 up->can.do_set_bittiming = ucan_set_bittiming;
1515 up->can.do_set_mode = &ucan_set_mode;
1549 up->can.state = CAN_STATE_STOPPED;