android_kernel_msm-6.1_noth.../include/linux/can
Vincent Mailhol 1c47fa6b31 can: dev: add a helper function to calculate the duration of one bit
Rename macro CAN_CALC_SYNC_SEG to CAN_SYNC_SEG and make it available
through include/linux/can/dev.h

Add an helper function can_bit_time() which returns the duration (in
time quanta) of one CAN bit.

Rationale for this patch: the sync segment and the bit time are two
concepts which are defined in the CAN ISO standard. Device drivers for
CAN might need those.

Please refer to ISO 11898-1:2015, section 11.3.1.1 "Bit time" for
additional information.

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/r/20201002154219.4887-6-mailhol.vincent@wanadoo.fr
[mkl: Let can_bit_time() return an unsinged int, make argument const]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-10-07 23:17:45 +02:00
..
dev can: dev: peak_canfd.h: Replace zero-length array with flexible-array member 2020-04-18 15:44:54 -05:00
platform can: mcp251x: get rid of legacy platform data 2019-11-11 21:57:28 +01:00
can-ml.h can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
core.h can: include: fix spelling mistakes 2020-09-21 10:13:15 +02:00
dev.h can: dev: add a helper function to calculate the duration of one bit 2020-10-07 23:17:45 +02:00
led.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rx-offload.h can: rx-offload: can_rx_offload_add_manual(): add new initialization function 2020-09-21 10:13:19 +02:00
skb.h can: Replace zero-length array with flexible-array 2020-06-15 23:08:31 -05:00