Lines Matching refs:can

10  * Full documentation of the GRCAN core can be found here:
13 * See "Documentation/devicetree/bindings/net/can/grcan.txt" for information on
31 #include <linux/can/dev.h>
249 struct can_priv can; /* must be the first member */
262 * frames can be echoed back. See the "Notes on the tx cyclic buffer
273 * as it can be changed in several places and together with decisions on
388 /* Configuration parameters that can be set via module parameters */
408 struct can_bittiming *bt = &priv->can.bittiming;
472 priv->can.state = CAN_STATE_STOPPED;
564 !(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)) {
585 * is also triggered when there is no one else on the can bus or when
587 * arbitration errors can not be singled out, no error frames are
592 if (priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT)
610 enum can_state state = priv->can.state;
635 priv->can.can_stats.bus_off++;
640 if (!priv->can.restart_ms)
648 priv->can.can_stats.error_passive++;
659 priv->can.can_stats.error_warning++;
679 priv->can.state = state;
683 if (priv->can.restart_ms && oldstate == CAN_STATE_BUS_OFF) {
688 priv->can.can_stats.restarts++;
739 priv->can.state = CAN_STATE_STOPPED;
854 priv->can.state = CAN_STATE_ERROR_ACTIVE;
856 | (priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT
865 !(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY))
875 * sized can frames in the given bitrate (in bits/sec). Waiting for this amount
876 * of time makes sure that the can controller have time to finish sending or
886 /* Set timer so that it will not fire until after a period in which the can
917 grcan_reset_timer(&priv->rr_timer, priv->can.bittiming.bitrate);
1000 | (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY ?
1002 | (priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES ?
1006 | (priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT
1012 priv->can.state = CAN_STATE_ERROR_ACTIVE;
1033 if (!(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY))
1063 priv->can.echo_skb_max = dma->tx.size;
1064 priv->can.echo_skb = priv->echo_skb;
1072 /* Get can device up */
1086 if (!(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY))
1124 priv->can.state = CAN_STATE_STOPPED;
1132 priv->can.echo_skb_max = 0;
1133 priv->can.echo_skb = NULL;
1151 !(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY))
1307 priv->can.bittiming.bitrate);
1320 /* In normal mode the socket-can transmission queue get
1321 * to keep the frame so that it can be retransmitted
1335 * grcan_start_xmit can enter more messages as long as regs->txwr does
1356 u32 oneshotmode = priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT;
1364 if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
1425 * the current txwr could hang the can controller
1600 priv->can.bittiming_const = &grcan_bittiming_const;
1601 priv->can.do_set_bittiming = grcan_set_bittiming;
1602 priv->can.do_set_mode = grcan_set_mode;
1603 priv->can.do_get_berr_counter = grcan_get_berr_counter;
1604 priv->can.clock.freq = ambafreq;
1605 priv->can.ctrlmode_supported =
1614 priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
1629 priv->regs, dev->irq, priv->can.clock.freq);