Lines Matching refs:can

29 #include <linux/can/dev.h>
30 #include <linux/can/error.h>
189 * @can: CAN private data structure.
193 * @tx_max: Maximum number packets the driver can send
207 struct can_priv can;
424 struct can_bittiming *bt = &priv->can.bittiming;
425 struct can_bittiming *dbt = &priv->can.data_bittiming;
459 if (can_tdc_is_enabled(&priv->can)) {
461 btr0 |= FIELD_PREP(XCAN_BRPR_TDCO_MASK, priv->can.tdc.tdco) |
464 btr0 |= FIELD_PREP(XCAN_2_BRPR_TDCO_MASK, priv->can.tdc.tdco) |
532 if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
549 priv->can.state = CAN_STATE_ERROR_ACTIVE;
992 enum can_state old_state = priv->can.state;
995 /* changing error state due to successful frame RX/TX can only
1037 priv->can.state = CAN_STATE_BUS_OFF;
1038 priv->can.can_stats.bus_off++;
1046 if (new_state != priv->can.state)
1052 priv->can.can_stats.arbitration_lost++;
1078 if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) {
1127 priv->can.can_stats.bus_error++;
1159 priv->can.state = CAN_STATE_SLEEPING;
1163 priv->can.state = CAN_STATE_ERROR_ACTIVE;
1408 /* Disable interrupts and leave the can in configuration mode */
1413 priv->can.state = CAN_STATE_STOPPED;
1707 { .compatible = "xlnx,zynq-can-1.0", .data = &xcan_zynq_data },
1708 { .compatible = "xlnx,axi-can-1.00.a", .data = &xcan_axi_data },
1771 * is supported, we can have 2 frames in the FIFO and use TXFEMP
1775 * FIFO, with watermark at 2 frames, it can happen that TXFWMEMP (less
1800 priv->can.bittiming_const = devtype->bittiming_const;
1801 priv->can.do_set_mode = xcan_do_set_mode;
1802 priv->can.do_get_berr_counter = xcan_get_berr_counter;
1803 priv->can.ctrlmode_supported = CAN_CTRLMODE_LOOPBACK |
1817 priv->can.data_bittiming_const =
1819 priv->can.tdc_const = &xcan_tdc_const_canfd;
1823 priv->can.data_bittiming_const =
1825 priv->can.tdc_const = &xcan_tdc_const_canfd2;
1830 priv->can.ctrlmode_supported |= CAN_CTRLMODE_FD |
1832 priv->can.do_get_auto_tdcv = xcan_get_auto_tdcv;
1893 priv->can.clock.freq = clk_get_rate(priv->can_clk);
1912 priv->reg_base, ndev->irq, priv->can.clock.freq,