can: peak: Fix bittiming fields size in bits
authorStephane Grosjean <s.grosjean@peak-system.com>
Thu, 1 Dec 2016 10:41:11 +0000 (11:41 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 1 Dec 2016 13:11:25 +0000 (14:11 +0100)
commitfe5b40642f1a2dddfeb84be007b2c975c28d4c6c
tree8f544059d051bd4b2eee1fdbd2d19e29fe591ac0
parentaa196eed3d80d4b003b04a270712b978a012a939
can: peak: Fix bittiming fields size in bits

This fixes the bitimings fields ranges supported by all the CAN-FD USB
interfaces of the PEAK-System CAN-FD adapters.

Very first development versions of the IP core API defined smaller TSGEx
and SJW fields for both nominal and data bittimings records than the
production versions. This patch fixes them by enlarging their sizes to
the actual values:

field:           old size:    fixed size:
nominal TSGEG1   6            8
nominal TSGEG2   4            7
nominal SJW      4            7
data TSGEG1      4            5
data TSGEG2      3            4
data SJW         2            4

Note that this has no other consequences than offering larger choice to
bitrate encoding.

Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_ucan.h
drivers/net/can/usb/peak_usb/pcan_usb_fd.c