summaryrefslogtreecommitdiff
path: root/include/linux/can/dev.h
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2021-01-11 15:19:18 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2021-01-13 09:42:58 +0100
commit5a9d5ecd69ed65fc2d49cdecfc1c1ab1e4d7af34 (patch)
tree8d190bbac664e269da05b278451c3d838842213c /include/linux/can/dev.h
parent3e77f70e734584e0ad1038e459ed3fd2400f873a (diff)
can: dev: move bittiming related code into seperate file
This patch moves the bittiming related code of the CAN device infrastructure into a separate file. Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/r/20210111141930.693847-4-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'include/linux/can/dev.h')
-rw-r--r--include/linux/can/dev.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
index 197a79535cc2..054c3bed190b 100644
--- a/include/linux/can/dev.h
+++ b/include/linux/can/dev.h
@@ -15,6 +15,7 @@
#define _CAN_DEV_H
#include <linux/can.h>
+#include <linux/can/bittiming.h>
#include <linux/can/error.h>
#include <linux/can/led.h>
#include <linux/can/netlink.h>
@@ -82,21 +83,6 @@ struct can_priv {
#endif
};
-#define CAN_SYNC_SEG 1
-
-/*
- * can_bit_time() - Duration of one bit
- *
- * Please refer to ISO 11898-1:2015, section 11.3.1.1 "Bit time" for
- * additional information.
- *
- * Return: the number of time quanta in one bit.
- */
-static inline unsigned int can_bit_time(const struct can_bittiming *bt)
-{
- return CAN_SYNC_SEG + bt->prop_seg + bt->phase_seg1 + bt->phase_seg2;
-}
-
/*
* can_cc_dlc2len(value) - convert a given data length code (dlc) of a
* Classical CAN frame into a valid data length of max. 8 bytes.