aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorStephane Grosjean <s.grosjean@peak-system.com>2015-01-23 05:31:19 -0500
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-01-28 08:47:05 -0500
commite3c5ea60b474f9ba7e99542325416ca6d833cba9 (patch)
tree70655a9f6f2e6a3ab7568d4eb686dff8103afef1 /drivers/net/can
parentd6b5f30d9886a4f1e00c9bf355af2a95cabafa09 (diff)
can: peak_usb: export ctrlmode_supported to adapter specific definition
Export the ctrlmode_supported value from the core file to each adapter specific file. This has been mandatory for supporting the new CANFD extension. Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/usb/peak_usb/pcan_usb.c1
-rw-r--r--drivers/net/can/usb/peak_usb/pcan_usb_core.c3
-rw-r--r--drivers/net/can/usb/peak_usb/pcan_usb_core.h1
-rw-r--r--drivers/net/can/usb/peak_usb/pcan_usb_pro.c1
4 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c
index d57d3f64a5bf..72427f21edff 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb.c
@@ -859,6 +859,7 @@ const struct peak_usb_adapter pcan_usb = {
859 .name = "PCAN-USB", 859 .name = "PCAN-USB",
860 .device_id = PCAN_USB_PRODUCT_ID, 860 .device_id = PCAN_USB_PRODUCT_ID,
861 .ctrl_count = 1, 861 .ctrl_count = 1,
862 .ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | CAN_CTRLMODE_LISTENONLY,
862 .clock = { 863 .clock = {
863 .freq = PCAN_USB_CRYSTAL_HZ / 2 , 864 .freq = PCAN_USB_CRYSTAL_HZ / 2 ,
864 }, 865 },
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
index 729b80d78322..2768399a52fa 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -750,8 +750,7 @@ static int peak_usb_create_dev(const struct peak_usb_adapter *peak_usb_adapter,
750 dev->can.bittiming_const = &peak_usb_adapter->bittiming_const; 750 dev->can.bittiming_const = &peak_usb_adapter->bittiming_const;
751 dev->can.do_set_bittiming = peak_usb_set_bittiming; 751 dev->can.do_set_bittiming = peak_usb_set_bittiming;
752 dev->can.do_set_mode = peak_usb_set_mode; 752 dev->can.do_set_mode = peak_usb_set_mode;
753 dev->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | 753 dev->can.ctrlmode_supported = peak_usb_adapter->ctrlmode_supported;
754 CAN_CTRLMODE_LISTENONLY;
755 754
756 netdev->netdev_ops = &peak_usb_netdev_ops; 755 netdev->netdev_ops = &peak_usb_netdev_ops;
757 756
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.h b/drivers/net/can/usb/peak_usb/pcan_usb_core.h
index 10f2fcac7c13..54fdb5978a05 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.h
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.h
@@ -44,6 +44,7 @@ struct peak_usb_device;
44struct peak_usb_adapter { 44struct peak_usb_adapter {
45 char *name; 45 char *name;
46 u32 device_id; 46 u32 device_id;
47 u32 ctrlmode_supported;
47 struct can_clock clock; 48 struct can_clock clock;
48 const struct can_bittiming_const bittiming_const; 49 const struct can_bittiming_const bittiming_const;
49 unsigned int ctrl_count; 50 unsigned int ctrl_count;
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
index 56855b2b1fa1..03f517160a67 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
@@ -1016,6 +1016,7 @@ const struct peak_usb_adapter pcan_usb_pro = {
1016 .name = "PCAN-USB Pro", 1016 .name = "PCAN-USB Pro",
1017 .device_id = PCAN_USBPRO_PRODUCT_ID, 1017 .device_id = PCAN_USBPRO_PRODUCT_ID,
1018 .ctrl_count = PCAN_USBPRO_CHANNEL_COUNT, 1018 .ctrl_count = PCAN_USBPRO_CHANNEL_COUNT,
1019 .ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | CAN_CTRLMODE_LISTENONLY,
1019 .clock = { 1020 .clock = {
1020 .freq = PCAN_USBPRO_CRYSTAL_HZ, 1021 .freq = PCAN_USBPRO_CRYSTAL_HZ,
1021 }, 1022 },