Lines Matching refs:can
11 * This program is free software; you can redistribute it and/or
23 #include <linux/can.h>
24 #include <linux/can/dev.h>
25 #include <linux/can/error.h>
26 #include <linux/can/platform/flexcan.h>
170 struct can_priv can;
206 return (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) &&
330 priv->can.can_stats.bus_error++;
363 switch (priv->can.state) {
373 priv->can.can_stats.error_warning++;
389 priv->can.can_stats.error_passive++;
442 if (likely(new_state == priv->can.state))
450 priv->can.state = new_state;
600 const struct can_bittiming *bt = &priv->can.bittiming;
620 if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
622 if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
624 if (priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES)
659 "Failed to softreset can module (mcr=0x%08x)\n",
728 /* synchronize with the can bus */
733 priv->can.state = CAN_STATE_ERROR_ACTIVE;
770 priv->can.state = CAN_STATE_STOPPED;
946 priv->can.clock.freq = clk_get_rate(clk);
947 priv->can.bittiming_const = &flexcan_bittiming_const;
948 priv->can.do_set_mode = flexcan_set_mode;
949 priv->can.do_get_berr_counter = flexcan_get_berr_counter;
950 priv->can.ctrlmode_supported = CAN_CTRLMODE_LOOPBACK |