<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/net/can/Kconfig, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/net/can/Kconfig?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/net/can/Kconfig?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-07-03T09:34:28Z</updated>
<entry>
<title>can: slcan: use CAN network device driver API</title>
<updated>2022-07-03T09:34:28Z</updated>
<author>
<name>Dario Binacchi</name>
<email>dario.binacchi@amarulasolutions.com</email>
</author>
<published>2022-06-28T16:31:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c4e54b063f42f20a6b3ad1ffa61c574e631e0216'/>
<id>urn:sha1:c4e54b063f42f20a6b3ad1ffa61c574e631e0216</id>
<content type='text'>
As suggested by commit [1], now the driver uses the functions and the
data structures provided by the CAN network device driver interface.

Currently the driver doesn't implement a way to set bitrate for SLCAN
based devices via ip tool, so you'll have to do this by slcand or
slcan_attach invocation through the -sX parameter:

- slcan_attach -f -s6 -o /dev/ttyACM0
- slcand -f -s8 -o /dev/ttyUSB0

where -s6 in will set adapter's bitrate to 500 Kbit/s and -s8 to
1Mbit/s.
See the table below for further CAN bitrates:
- s0 -&gt;   10 Kbit/s
- s1 -&gt;   20 Kbit/s
- s2 -&gt;   50 Kbit/s
- s3 -&gt;  100 Kbit/s
- s4 -&gt;  125 Kbit/s
- s5 -&gt;  250 Kbit/s
- s6 -&gt;  500 Kbit/s
- s7 -&gt;  800 Kbit/s
- s8 -&gt; 1000 Kbit/s

In doing so, the struct can_priv::bittiming.bitrate of the driver is not
set and since the open_candev() checks that the bitrate has been set, it
must be a non-zero value, the bitrate is set to a fake value (-1U)
before it is called.

Using the rtnl_lock()/rtnl_unlock() functions has become a bit more
tricky as the register_candev() function indirectly calls rtnl_lock()
via register_netdev(). To avoid a deadlock it is therefore necessary to
call rtnl_unlock() before calling register_candev(). The same goes for
the unregister_candev() function.

[1] commit 39549eef3587f ("can: CAN Network device driver and Netlink interface")

Link: https://lore.kernel.org/all/20220628163137.413025-6-dario.binacchi@amarulasolutions.com
Signed-off-by: Dario Binacchi &lt;dario.binacchi@amarulasolutions.com&gt;
Tested-by: Jeroen Hofstee &lt;jhofstee@victronenergy.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: can327: CAN/ldisc driver for ELM327 based OBD-II adapters</title>
<updated>2022-06-27T15:00:04Z</updated>
<author>
<name>Max Staudt</name>
<email>max@enpas.org</email>
</author>
<published>2022-06-18T19:50:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=43da2f07622f41376c7ddab8f73dc2b1d3ab9715'/>
<id>urn:sha1:43da2f07622f41376c7ddab8f73dc2b1d3ab9715</id>
<content type='text'>
This is the can327 driver. It does a surprisingly good job at turning
ELM327 based OBD-II interfaces into cheap CAN interfaces for simple
homebrew projects.

Please see the included documentation for details and limitations:
Documentation/networking/device_drivers/can/can327.rst

Link: https://lore.kernel.org/all/20220618195031.10975-1-max@enpas.org
Signed-off-by: Max Staudt &lt;max@enpas.org&gt;
Reviewed-by: Vincent Mailhol &lt;mailhol.vincent@wanadoo.fr&gt;
[mkl: minor coding style improvements]
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>net: Kconfig: move the CAN device menu to the "Device Drivers" section</title>
<updated>2022-06-11T15:11:02Z</updated>
<author>
<name>Vincent Mailhol</name>
<email>mailhol.vincent@wanadoo.fr</email>
</author>
<published>2022-06-10T14:30:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d7786af59860a113d62150c4328674e896da7810'/>
<id>urn:sha1:d7786af59860a113d62150c4328674e896da7810</id>
<content type='text'>
The devices are meant to be under the "Device Drivers" category of the
menuconfig. The CAN subsystem is currently one of the rare exception
with all of its devices under the "Networking support" category.

The CAN_DEV menuentry gets moved to fix this discrepancy. The CAN menu
is added just before MCTP in order to be consistent with the current
order under the "Networking support" menu.

A dependency on CAN is added to CAN_DEV so that the CAN devices only
show up if the CAN subsystem is enabled.

Link: https://lore.kernel.org/all/20220610143009.323579-6-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol &lt;mailhol.vincent@wanadoo.fr&gt;
Acked-by: Max Staudt &lt;max@enpas.org&gt;
Tested-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: Kconfig: add CONFIG_CAN_RX_OFFLOAD</title>
<updated>2022-06-11T15:11:02Z</updated>
<author>
<name>Vincent Mailhol</name>
<email>mailhol.vincent@wanadoo.fr</email>
</author>
<published>2022-06-10T14:30:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bfe0092dc237963b035d8404ecd61d60f0ef1a5d'/>
<id>urn:sha1:bfe0092dc237963b035d8404ecd61d60f0ef1a5d</id>
<content type='text'>
Only a few drivers rely on the CAN rx offload framework (as of the
writing of this patch, only four: flexcan, m_can, mcp251xfd and
ti_hecc). Split it out of can-dev and add a new config symbol:
CAN_RX_OFFLOAD.

The drivers relying on CAN rx offload are in different sub
folders. Make CAN_RX_OFFLOAD an hidden option and tag all the drivers
depending on that feature with "select CAN_RX_OFFLOAD" so that the
option gets automatically enabled if and only if one of those drivers
is chosen.

Link: https://lore.kernel.org/all/20220610143009.323579-5-mailhol.vincent@wanadoo.fr
Suggested-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Suggested-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Vincent Mailhol &lt;mailhol.vincent@wanadoo.fr&gt;
Acked-by: Max Staudt &lt;max@enpas.org&gt;
Tested-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: bittiming: move bittiming calculation functions to calc_bittiming.c</title>
<updated>2022-06-11T15:11:01Z</updated>
<author>
<name>Vincent Mailhol</name>
<email>mailhol.vincent@wanadoo.fr</email>
</author>
<published>2022-06-10T14:30:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0c7e115138830af77d480ee9185bbdc23c6e73a4'/>
<id>urn:sha1:0c7e115138830af77d480ee9185bbdc23c6e73a4</id>
<content type='text'>
The canonical way to select or deselect an object during compilation
is to use this pattern in the relevant Makefile:

bar-$(CONFIG_FOO) := foo.o

bittiming.c instead uses some #ifdef CONFIG_CAN_CALC_BITTIMG.

Create a new file named calc_bittiming.c with all the functions which
are conditionally compiled with CONFIG_CAN_CALC_BITTIMG and modify the
Makefile according to above pattern.

Link: https://lore.kernel.org/all/20220610143009.323579-4-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol &lt;mailhol.vincent@wanadoo.fr&gt;
Acked-by: Max Staudt &lt;max@enpas.org&gt;
Tested-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: Kconfig: turn menu "CAN Device Drivers" into a menuconfig using CAN_DEV</title>
<updated>2022-06-11T15:11:01Z</updated>
<author>
<name>Vincent Mailhol</name>
<email>mailhol.vincent@wanadoo.fr</email>
</author>
<published>2022-06-10T14:30:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6a5286442fb64a2d512e4059004441e59c786ebc'/>
<id>urn:sha1:6a5286442fb64a2d512e4059004441e59c786ebc</id>
<content type='text'>
In the next patches, the software/virtual drivers (slcan, v(x)can)
will depend on drivers/net/can/dev/skb.o.

This patch changes the scope of the can-dev module to include the
above mentioned drivers.

To do so, we reuse the menu "CAN Device Drivers" and turn it into a
configmenu using the config symbol CAN_DEV (which we released in
previous patch). Also, add a description to this new CAN_DEV
menuconfig.

The symbol CAN_DEV now only triggers the build of skb.o. For this
reasons, all the macros from linux/module.h are deported from
drivers/net/can/dev/dev.c to drivers/net/can/dev/skb.c.

Finally, drivers/net/can/dev/Makefile is adjusted accordingly.

Link: https://lore.kernel.org/all/20220610143009.323579-3-mailhol.vincent@wanadoo.fr
Suggested-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Vincent Mailhol &lt;mailhol.vincent@wanadoo.fr&gt;
Acked-by: Max Staudt &lt;max@enpas.org&gt;
Tested-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: Kconfig: rename config symbol CAN_DEV into CAN_NETLINK</title>
<updated>2022-06-11T15:11:01Z</updated>
<author>
<name>Vincent Mailhol</name>
<email>mailhol.vincent@wanadoo.fr</email>
</author>
<published>2022-06-10T14:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=df6ad5dd838e0fa543ca28ca6154901fa65a9443'/>
<id>urn:sha1:df6ad5dd838e0fa543ca28ca6154901fa65a9443</id>
<content type='text'>
In the next patches, the scope of the can-dev module will grow to
engloble the software/virtual drivers (slcan, v(x)can). To this
extent, release CAN_DEV by renaming it into CAN_NETLINK. The config
symbol CAN_DEV will be reused to cover this extended scope.

The rationale for the name CAN_NETLINK is that netlink is the
predominant feature added here.

The current description only mentions platform drivers despite the
fact that this symbol is also required by "normal" devices (e.g. USB
or PCI) which do not fall under the platform devices category. The
description is updated accordingly to fix this gap.

Link: https://lore.kernel.org/all/20220610143009.323579-2-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol &lt;mailhol.vincent@wanadoo.fr&gt;
Acked-by: Max Staudt &lt;max@enpas.org&gt;
Tested-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: can-dev: remove obsolete CAN LED support</title>
<updated>2022-05-19T20:15:51Z</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2022-05-18T15:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6c1e423a3c84953edcf91ff03ab97829b287184a'/>
<id>urn:sha1:6c1e423a3c84953edcf91ff03ab97829b287184a</id>
<content type='text'>
Since commit 30f3b42147ba6f ("can: mark led trigger as broken") the
CAN specific LED support was disabled and marked as BROKEN. As the
common LED support with CONFIG_LEDS_TRIGGER_NETDEV should do this work
now the code can be removed as preparation for a CAN netdevice Kconfig
rework.

Link: https://lore.kernel.org/all/20220518154527.29046-1-socketcan@hartkopp.net
Suggested-by: Vincent Mailhol &lt;mailhol.vincent@wanadoo.fr&gt;
Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
[mkl: remove led.h from MAINTAINERS]
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: ctucanfd: add support for CTU CAN FD open-source IP core - bus independent part.</title>
<updated>2022-04-19T15:12:14Z</updated>
<author>
<name>Martin Jerabek</name>
<email>martin.jerabek01@gmail.com</email>
</author>
<published>2022-03-21T23:32:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2dcb8e8782d8e4c38903bf37b1a24d3ffd193da7'/>
<id>urn:sha1:2dcb8e8782d8e4c38903bf37b1a24d3ffd193da7</id>
<content type='text'>
This driver adds support for the CTU CAN FD open-source IP core.
More documentation and core sources at project page
(https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core).
The core integration to Xilinx Zynq system as platform driver
is available (https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top).
Implementation on Intel FPGA based PCI Express board is available
from project (https://gitlab.fel.cvut.cz/canbus/pcie-ctucanfd).

More about CAN bus related projects used and developed at CTU FEE at
https://canbus.pages.fel.cvut.cz/ .

Link: https://lore.kernel.org/all/1906e4941560ae2ce4b8d181131fd4963aa31611.1647904780.git.pisa@cmp.felk.cvut.cz
Signed-off-by: Martin Jerabek &lt;martin.jerabek01@gmail.com&gt;
Signed-off-by: Ondrej Ille &lt;ondrej.ille@gmail.com&gt;
Signed-off-by: Pavel Pisa &lt;pisa@cmp.felk.cvut.cz&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: flexcan: update Kconfig to enable coldfire</title>
<updated>2021-07-25T09:36:29Z</updated>
<author>
<name>Angelo Dureghello</name>
<email>angelo@kernel-space.org</email>
</author>
<published>2021-07-02T09:48:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8dad5561c13ade87238d9de6dd410b43f7562447'/>
<id>urn:sha1:8dad5561c13ade87238d9de6dd410b43f7562447</id>
<content type='text'>
Update flexcan to support coldfire architecture.

Any new platform should use OF, but coldfire architecture is
actually not supporting devicetrees.

Link: https://lore.kernel.org/r/20210702094841.327679-4-angelo@kernel-space.org
Signed-off-by: Angelo Dureghello &lt;angelo@kernel-space.org&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
</feed>
