Skip to content

Commit

Permalink
can: add slcan driver for serial/USB-serial CAN adapters
Browse files Browse the repository at this point in the history
This patch adds support for serial/USB-serial CAN adapters implementing the
LAWICEL ASCII protocol for CAN frame transport over serial lines.

The driver implements the SLCAN line discipline and is heavily based on the
slip.c driver. Therefore the code style remains similar to slip.c to be able
to apply changes of the SLIP driver to the SLCAN driver easily.

For more details see the slcan Kconfig entry.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
hartkopp authored and davem330 committed Dec 8, 2010

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 58e481f commit a1044e3
Showing 3 changed files with 777 additions and 0 deletions.
21 changes: 21 additions & 0 deletions drivers/net/can/Kconfig
Original file line number Diff line number Diff line change
@@ -12,6 +12,27 @@ config CAN_VCAN
This driver can also be built as a module. If so, the module
will be called vcan.

config CAN_SLCAN
tristate "Serial / USB serial CAN Adaptors (slcan)"
depends on CAN
default N
---help---
CAN driver for several 'low cost' CAN interfaces that are attached
via serial lines or via USB-to-serial adapters using the LAWICEL
ASCII protocol. The driver implements the tty linediscipline N_SLCAN.

As only the sending and receiving of CAN frames is implemented, this
driver should work with the (serial/USB) CAN hardware from:
www.canusb.com / www.can232.com / www.mictronic.com / www.canhack.de

Userspace tools to attach the SLCAN line discipline (slcan_attach,
slcand) can be found in the can-utils at the SocketCAN SVN, see
http://developer.berlios.de/projects/socketcan for details.

The slcan driver supports up to 10 CAN netdevices by default which
can be changed by the 'maxdev=xx' module option. This driver can
also be built as a module. If so, the module will be called slcan.

config CAN_DEV
tristate "Platform CAN drivers with Netlink support"
depends on CAN
1 change: 1 addition & 0 deletions drivers/net/can/Makefile
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
#

obj-$(CONFIG_CAN_VCAN) += vcan.o
obj-$(CONFIG_CAN_SLCAN) += slcan.o

obj-$(CONFIG_CAN_DEV) += can-dev.o
can-dev-y := dev.o
Loading

0 comments on commit a1044e3

Please sign in to comment.