linux/drivers/net/can/dev
Vincent Mailhol 1d7750760b can: bittiming: add CAN_KBPS, CAN_MBPS and CAN_MHZ macros
Add three macro to simplify the readability of big bit timing numbers:
  - CAN_KBPS: kilobits per second (one thousand)
  - CAN_MBPS: megabits per second (one million)
  - CAN_MHZ: megahertz per second (one million)

Example:
	u32 bitrate_max = 8 * CAN_MBPS;
	struct can_clock clock = {.freq = 80 * CAN_MHZ};
instead of:
	u32 bitrate_max = 8000000;
	struct can_clock clock = {.freq = 80000000};

Apply the new macro to driver/net/can/dev/bittiming.c.

Link: https://lore.kernel.org/r/20210306054040.76483-1-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-03-30 11:14:45 +02:00
..
bittiming.c can: bittiming: add CAN_KBPS, CAN_MBPS and CAN_MHZ macros 2021-03-30 11:14:45 +02:00
dev.c
length.c
Makefile
netlink.c can: bittiming: add calculation for CAN FD Transmitter Delay Compensation (TDC) 2021-03-30 11:14:45 +02:00
rx-offload.c
skb.c can: dev: can_free_echo_skb(): extend to return can frame length 2021-03-30 11:14:28 +02:00