Commit b8f91799 authored by Jimmy Assarsson's avatar Jimmy Assarsson Committed by Marc Kleine-Budde

can: kvaser_usb: make use of units.h in assignment of frequency

Use the MEGA define plus the comment /* Hz */ when assigning
frequencies.

Link: https://lore.kernel.org/all/20211210075803.343841-1-mkl@pengutronix.deSigned-off-by: default avatarJimmy Assarsson <extja@kvaser.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 68fa39ea
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/units.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/can.h> #include <linux/can.h>
...@@ -2040,7 +2041,7 @@ const struct kvaser_usb_dev_ops kvaser_usb_hydra_dev_ops = { ...@@ -2040,7 +2041,7 @@ const struct kvaser_usb_dev_ops kvaser_usb_hydra_dev_ops = {
static const struct kvaser_usb_dev_cfg kvaser_usb_hydra_dev_cfg_kcan = { static const struct kvaser_usb_dev_cfg kvaser_usb_hydra_dev_cfg_kcan = {
.clock = { .clock = {
.freq = 80000000, .freq = 80 * MEGA /* Hz */,
}, },
.timestamp_freq = 80, .timestamp_freq = 80,
.bittiming_const = &kvaser_usb_hydra_kcan_bittiming_c, .bittiming_const = &kvaser_usb_hydra_kcan_bittiming_c,
...@@ -2049,7 +2050,7 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_hydra_dev_cfg_kcan = { ...@@ -2049,7 +2050,7 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_hydra_dev_cfg_kcan = {
static const struct kvaser_usb_dev_cfg kvaser_usb_hydra_dev_cfg_flexc = { static const struct kvaser_usb_dev_cfg kvaser_usb_hydra_dev_cfg_flexc = {
.clock = { .clock = {
.freq = 24000000, .freq = 24 * MEGA /* Hz */,
}, },
.timestamp_freq = 1, .timestamp_freq = 1,
.bittiming_const = &kvaser_usb_hydra_flexc_bittiming_c, .bittiming_const = &kvaser_usb_hydra_flexc_bittiming_c,
...@@ -2057,7 +2058,7 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_hydra_dev_cfg_flexc = { ...@@ -2057,7 +2058,7 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_hydra_dev_cfg_flexc = {
static const struct kvaser_usb_dev_cfg kvaser_usb_hydra_dev_cfg_rt = { static const struct kvaser_usb_dev_cfg kvaser_usb_hydra_dev_cfg_rt = {
.clock = { .clock = {
.freq = 80000000, .freq = 80 * MEGA /* Hz */,
}, },
.timestamp_freq = 24, .timestamp_freq = 24,
.bittiming_const = &kvaser_usb_hydra_rt_bittiming_c, .bittiming_const = &kvaser_usb_hydra_rt_bittiming_c,
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/units.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/can.h> #include <linux/can.h>
...@@ -356,7 +357,7 @@ static const struct can_bittiming_const kvaser_usb_leaf_bittiming_const = { ...@@ -356,7 +357,7 @@ static const struct can_bittiming_const kvaser_usb_leaf_bittiming_const = {
static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_8mhz = { static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_8mhz = {
.clock = { .clock = {
.freq = 8000000, .freq = 8 * MEGA /* Hz */,
}, },
.timestamp_freq = 1, .timestamp_freq = 1,
.bittiming_const = &kvaser_usb_leaf_bittiming_const, .bittiming_const = &kvaser_usb_leaf_bittiming_const,
...@@ -364,7 +365,7 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_8mhz = { ...@@ -364,7 +365,7 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_8mhz = {
static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_16mhz = { static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_16mhz = {
.clock = { .clock = {
.freq = 16000000, .freq = 16 * MEGA /* Hz */,
}, },
.timestamp_freq = 1, .timestamp_freq = 1,
.bittiming_const = &kvaser_usb_leaf_bittiming_const, .bittiming_const = &kvaser_usb_leaf_bittiming_const,
...@@ -372,7 +373,7 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_16mhz = { ...@@ -372,7 +373,7 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_16mhz = {
static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_24mhz = { static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_24mhz = {
.clock = { .clock = {
.freq = 24000000, .freq = 24 * MEGA /* Hz */,
}, },
.timestamp_freq = 1, .timestamp_freq = 1,
.bittiming_const = &kvaser_usb_leaf_bittiming_const, .bittiming_const = &kvaser_usb_leaf_bittiming_const,
...@@ -380,7 +381,7 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_24mhz = { ...@@ -380,7 +381,7 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_24mhz = {
static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_32mhz = { static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_32mhz = {
.clock = { .clock = {
.freq = 32000000, .freq = 32 * MEGA /* Hz */,
}, },
.timestamp_freq = 1, .timestamp_freq = 1,
.bittiming_const = &kvaser_usb_leaf_bittiming_const, .bittiming_const = &kvaser_usb_leaf_bittiming_const,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment