]> rtime.felk.cvut.cz Git - socketcan-devel.git/commit
candev: allow SJW user setting for bittiming calculation
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Fri, 30 Sep 2011 10:02:24 +0000 (10:02 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Fri, 30 Sep 2011 10:02:24 +0000 (10:02 +0000)
commit068120ecf01adb48454d54e029bcea7b3a83e25e
tree67444e3b3f2bc17a75d26b790a2fc8e44bfd16bf
parent5c26be48da98190f6d359afffc820a60c570babf
candev: allow SJW user setting for bittiming calculation

This patch adds support for SJW user settings to not set the synchronization
jump width (SJW) to 1 in any case when using the in-kernel bittiming
calculation.

The ip-tool from iproute2 already supports to pass the user defined SJW
value. The given SJW value is sanitized with the controller specific sjw_max
and the calculated tseg2 value. As the SJW can have values up to 4 providing
this value will lead to the maximum possible SJW automatically. A higher SJW
allows higher controller oscillator tolerances.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1276 030b6a49-0b11-0410-94ab-b0dab22257f2
kernel/2.6/drivers/net/can/dev.c