linux/drivers/net/can/usb/Kconfig
Ji-Ze Hong 88da174369 can: usb: f81604: add Fintek F81604 support
This patch adds support for Fintek USB to 2CAN controller.

Changelog:
v7: https://lore.kernel.org/all/20230509073821.25289-1-peter_hong@fintek.com.tw
  1. Fix consistency of coding style for "break" in f81604_register_urbs().
  2. Remove goto statement in f81604_open().

v6: https://lore.kernel.org/all/20230505022317.22417-1-peter_hong@fintek.com.tw
  1. Remove non-used define and change constant mask to GENMASK().
  2. Move some variables declaration from function start to block start.
  3. Move some variables initization into declaration.
  4. Change variable "id" in f81604_start_xmit() only for CAN ID usage.

v5: https://lore.kernel.org/all/20230420024403.13830-1-peter_hong@fintek.com.tw
  1. Change all u8 *buff to struct f81604_int_data/f81604_can_frame.
  2. Change all netdev->dev_id to netdev->dev_port.
  3. Remove over design for f81604_process_rx_packet(). This device only
     report a frame at once, so the f81604_process_rx_packet() are reduced
     to process 1 frame.

v4: https://lore.kernel.org/all/20230413084253.1524-1-peter_hong@fintek.com.tw
  1. Remove f81604_prepare_urbs/f81604_remove_urbs() and alloc URB/buffer
     dynamically in f81604_register_urbs(), using "urbs_anchor" for manage
     all rx/int URBs.
  2. Add F81604 to MAINTAINERS list.
  3. Change handle_clear_reg_work/handle_clear_overrun_work to single
     clear_reg_work and using bitwise "clear_flags" to record it.
  4. Move __f81604_set_termination in front of f81604_probe() to avoid
     rarely racing condition.
  5. Add __aligned to struct f81604_int_data / f81604_sff / f81604_eff.
  6. Add aligned operations in f81604_start_xmit/f81604_process_rx_packet().
  7. Change lots of CANBUS functions first parameter from struct usb_device*
     to struct f81604_port_priv *priv. But remain f81604_write / f81604_read
     / f81604_update_bits() as struct usb_device* for
     __f81604_set_termination() in probe() stage.
  8. Simplify f81604_read_int_callback() and separate into
     f81604_handle_tx / f81604_handle_can_bus_errors() functions.

v3: https://lore.kernel.org/all/20230327051048.11589-1-peter_hong@fintek.com.tw
  1. Change CAN clock to using MEGA units.
  2. Remove USB set/get retry, only remain SJA1000 reset/operation retry.
  3. Fix all numberic constant to define.
  4. Add terminator control. (only 0 & 120 ohm)
  5. Using struct data to represent INT/TX/RX endpoints data instead byte
     arrays.
  6. Error message reports changed from %d to %pe for mnemotechnic values.
  7. Some bit operations are changed to FIELD_PREP().
  8. Separate TX functions from f81604_read_int_callback().
  9. cf->can_id |= CAN_ERR_CNT in f81604_read_int_callback to report valid
     TX/RX error counts.
  10. Move f81604_prepare_urbs/f81604_remove_urbs() from CAN open/close() to
      USB probe/disconnect().
  11. coding style refactoring.

v2: https://lore.kernel.org/all/20230321081152.26510-1-peter_hong@fintek.com.tw
  1. coding style refactoring.
  2. some const number are defined to describe itself.
  3. fix wrong usage for can_get_echo_skb() in f81604_write_bulk_callback().

v1: https://lore.kernel.org/all/20230317093352.3979-1-peter_hong@fintek.com.tw

Signed-off-by: Ji-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/20230509073821.25289-1-peter_hong@fintek.com.tw
[mkl: add changelog, fix printf format]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2023-05-15 22:53:49 +02:00

163 lines
5.1 KiB
Plaintext

# SPDX-License-Identifier: GPL-2.0-only
menu "CAN USB interfaces"
depends on USB
config CAN_8DEV_USB
tristate "8 devices USB2CAN interface"
help
This driver supports the USB2CAN interface
from 8 devices (http://www.8devices.com).
config CAN_EMS_USB
tristate "EMS CPC-USB/ARM7 CAN/USB interface"
help
This driver is for the one channel CPC-USB/ARM7 CAN/USB interface
from EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de).
config CAN_ESD_USB
tristate "esd electronics gmbh CAN/USB interfaces"
help
This driver adds supports for several CAN/USB interfaces
from esd electronics gmbh (https://www.esd.eu).
The drivers supports the following devices:
- esd CAN-USB/2
- esd CAN-USB/Micro
To compile this driver as a module, choose M here: the module
will be called esd_usb.
config CAN_ETAS_ES58X
tristate "ETAS ES58X CAN/USB interfaces"
select CRC16
select NET_DEVLINK
help
This driver supports the ES581.4, ES582.1 and ES584.1 interfaces
from ETAS GmbH (https://www.etas.com/en/products/es58x.php).
To compile this driver as a module, choose M here: the module
will be called etas_es58x.
config CAN_F81604
tristate "Fintek F81604 USB to 2CAN interface"
help
This driver supports the Fintek F81604 USB to 2CAN interface.
The device can support CAN2.0A/B protocol and also support
2 output pins to control external terminator (optional).
To compile this driver as a module, choose M here: the module will
be called f81604.
(see also https://www.fintek.com.tw).
config CAN_GS_USB
tristate "Geschwister Schneider UG and candleLight compatible interfaces"
help
This driver supports the Geschwister Schneider and
bytewerk.org candleLight compatible
(https://github.com/candle-usb/candleLight_fw) USB/CAN
interfaces.
If unsure choose N,
choose Y for built in support,
M to compile as module (module will be named: gs_usb).
config CAN_KVASER_USB
tristate "Kvaser CAN/USB interface"
help
This driver adds support for Kvaser CAN/USB devices like Kvaser
Leaf Light, Kvaser USBcan II and Kvaser Memorator Pro 5xHS.
The driver provides support for the following devices:
- Kvaser Leaf Light
- Kvaser Leaf Professional HS
- Kvaser Leaf SemiPro HS
- Kvaser Leaf Professional LS
- Kvaser Leaf Professional SWC
- Kvaser Leaf Professional LIN
- Kvaser Leaf SemiPro LS
- Kvaser Leaf SemiPro SWC
- Kvaser Memorator II HS/HS
- Kvaser USBcan Professional HS/HS
- Kvaser Leaf Light GI
- Kvaser Leaf Professional HS (OBD-II connector)
- Kvaser Memorator Professional HS/LS
- Kvaser Leaf Light "China"
- Kvaser BlackBird SemiPro
- Kvaser USBcan R
- Kvaser USBcan R v2
- Kvaser Leaf Light v2
- Kvaser Leaf Light R v2
- Kvaser Mini PCI Express HS
- Kvaser Mini PCI Express 2xHS
- Kvaser USBcan Light 2xHS
- Kvaser USBcan II HS/HS
- Kvaser USBcan II HS/LS
- Kvaser USBcan Rugged ("USBcan Rev B")
- Kvaser Memorator HS/HS
- Kvaser Memorator HS/LS
- Scania VCI2 (if you have the Kvaser logo on top)
- Kvaser BlackBird v2
- Kvaser Leaf Pro HS v2
- Kvaser Hybrid CAN/LIN
- Kvaser Hybrid 2xCAN/LIN
- Kvaser Hybrid Pro CAN/LIN
- Kvaser Hybrid Pro 2xCAN/LIN
- Kvaser Memorator 2xHS v2
- Kvaser Memorator Pro 2xHS v2
- Kvaser Memorator Pro 5xHS
- Kvaser USBcan Light 4xHS
- Kvaser USBcan Pro 2xHS v2
- Kvaser USBcan Pro 4xHS
- Kvaser USBcan Pro 5xHS
- Kvaser U100
- Kvaser U100P
- Kvaser U100S
- ATI Memorator Pro 2xHS v2
- ATI USBcan Pro 2xHS v2
If unsure, say N.
To compile this driver as a module, choose M here: the
module will be called kvaser_usb.
config CAN_MCBA_USB
tristate "Microchip CAN BUS Analyzer interface"
help
This driver supports the CAN BUS Analyzer interface
from Microchip (http://www.microchip.com/development-tools/).
config CAN_PEAK_USB
tristate "PEAK PCAN-USB/USB Pro interfaces for CAN 2.0b/CAN-FD"
help
This driver supports the PEAK-System Technik USB adapters that enable
access to the CAN bus, with respect to the CAN 2.0b and/or CAN-FD
standards, that is:
PCAN-USB single CAN 2.0b channel USB adapter
PCAN-USB Pro dual CAN 2.0b channels USB adapter
PCAN-USB FD single CAN-FD channel USB adapter
PCAN-USB Pro FD dual CAN-FD channels USB adapter
PCAN-Chip USB CAN-FD to USB stamp module
PCAN-USB X6 6 CAN-FD channels USB adapter
(see also http://www.peak-system.com).
config CAN_UCAN
tristate "Theobroma Systems UCAN interface"
help
This driver supports the Theobroma Systems
UCAN USB-CAN interface.
The UCAN driver supports the microcontroller-based USB/CAN
adapters from Theobroma Systems. There are two form-factors
that run essentially the same firmware:
* Seal: standalone USB stick
https://www.theobroma-systems.com/seal)
* Mule: integrated on the PCB of various System-on-Modules
from Theobroma Systems like the A31-µQ7 and the RK3399-Q7
(https://www.theobroma-systems.com/rk3399-q7)
endmenu