summaryrefslogtreecommitdiffstats
path: root/Documentation/networking
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2022-10-26 13:46:38 +0100
committerDavid S. Miller <davem@davemloft.net>2022-10-26 13:46:38 +0100
commit9c8dddab2a3c30a8c1d410c906afbcacb46f8a3f (patch)
tree0fbde47671ae8585482000fa0dcf658badaec079 /Documentation/networking
parentd0217284cea7d470e4140e98b806cb3cdf8257d6 (diff)
parent68399ff574e4faf42b8d85da9339ca3ee2892cc7 (diff)
downloadlinux-9c8dddab2a3c30a8c1d410c906afbcacb46f8a3f.tar.bz2
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next
Marc Kleine-Budde says: ==================== this is a pull request of 29 patches for net-next/master. The first patch is by Daniel S. Trevitz and adds documentation for switchable termination resistors. Zhang Changzhong's patch fixes a debug output in the j13939 stack. Oliver Hartkopp finally removes the pch_can driver, which is superseded by the generic c_can driver. Gustavo A. R. Silva replaces a zero-length array with DECLARE_FLEX_ARRAY() in the ucan driver. Kees Cook's patch removes a no longer needed silencing of "-Warray-bounds" warnings for the kvaser_usb driver. The next 2 patches target the m_can driver. The first is by me cleans up the LEC error handling, the second is by Vivek Yadav and extends the LEC error handling to the data phase of CAN-FD frames. The next 9 patches all target the gs_usb driver. The first 5 patches are by me and improve the Kconfig prompt and help text, set netdev->dev_id to distinguish multi CAN channel devices, allow loopback and listen only at the same time, and clean up the gs_can_open() function a bit. The remaining 4 patches are by Jeroen Hofstee and add support for 2 new features: Bus Error Reporting and Get State. Jimmy Assarsson and Anssi Hannula contribute 10 patches for the kvaser_usb driver. They first add Listen Only and Bus Error Reporting support, handle CMD_ERROR_EVENT errors, improve CAN state handling, restart events, and configuration of the bit timing parameters. Another patch by me which fixes the indention in the m_can driver. A patch by Dongliang Mu cleans up the ucan_disconnect() function in the ucan driver. The last patch by Biju Das is for the rcan_canfd driver and cleans up the reset handling. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking')
-rw-r--r--Documentation/networking/can.rst33
1 files changed, 33 insertions, 0 deletions
diff --git a/Documentation/networking/can.rst b/Documentation/networking/can.rst
index ebc822e605f5..90121deef217 100644
--- a/Documentation/networking/can.rst
+++ b/Documentation/networking/can.rst
@@ -1148,6 +1148,39 @@ tuning on deep embedded systems'. The author is running a MPC603e
load without any problems ...
+Switchable Termination Resistors
+--------------------------------
+
+CAN bus requires a specific impedance across the differential pair,
+typically provided by two 120Ohm resistors on the farthest nodes of
+the bus. Some CAN controllers support activating / deactivating a
+termination resistor(s) to provide the correct impedance.
+
+Query the available resistances::
+
+ $ ip -details link show can0
+ ...
+ termination 120 [ 0, 120 ]
+
+Activate the terminating resistor::
+
+ $ ip link set dev can0 type can termination 120
+
+Deactivate the terminating resistor::
+
+ $ ip link set dev can0 type can termination 0
+
+To enable termination resistor support to a can-controller, either
+implement in the controller's struct can-priv::
+
+ termination_const
+ termination_const_cnt
+ do_set_termination
+
+or add gpio control with the device tree entries from
+Documentation/devicetree/bindings/net/can/can-controller.yaml
+
+
The Virtual CAN Driver (vcan)
-----------------------------