]> git.baikalelectronics.ru Git - kernel.git/commit
can: dev: provide optional GPIO based termination support
authorOleksij Rempel <o.rempel@pengutronix.de>
Wed, 18 Aug 2021 07:12:32 +0000 (09:12 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 19 Aug 2021 13:07:03 +0000 (15:07 +0200)
commit209a69bca37ecb98054da164f0b18df788634d62
tree6450b887ef1a071b52e134e1bb3dc533c0a6d5b3
parentb2692656c0467d724a8020fe5c2b889013ca7369
can: dev: provide optional GPIO based termination support

For CAN buses to work, a termination resistor has to be present at both
ends of the bus. This resistor is usually 120 Ohms, other values may be
required for special bus topologies.

This patch adds support for a generic GPIO based CAN termination. The
resistor value has to be specified via device tree, and it can only be
attached to or detached from the bus. By default the termination is not
active.

Link: https://lore.kernel.org/r/20210818071232.20585-4-o.rempel@pengutronix.de
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev/dev.c
include/linux/can/dev.h