]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
can: dev: can_changelink: allow to set bitrate on devices not providing {data_,}bitti...
authorMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 6 Jan 2017 10:12:41 +0000 (11:12 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 24 Jan 2017 12:52:00 +0000 (13:52 +0100)
commitc3606d438a14faa8319eccb75b9502960a97af16
tree04c944edb43845d96e2f66a060f2196299cd4280
parent12a6075cabc0d9ffbc0366b44daa22f278606312
can: dev: can_changelink: allow to set bitrate on devices not providing {data_,}bittiming_const

Until commit

    08da7da41ea4 can: provide a separate bittiming_const parameter to
                 bittiming functions

it was possible to have devices not providing bittiming_const. This can
be used for hardware that only support pre-defined fixed bitrates.
Although no mainline driver is using this feature so far.

This patch re-introduces this feature for the bitrate and the data
bitrate (of CANFD controllers). The driver can specify the
{data_,}bittiming_const (if the bittiming parameters should be
calculated from the bittiming_const) as before or no
{data_,}bittiming_const but implement the do_set_{data,}bittiming
callback.

Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev.c