Re: AW: assignment of spi to can channels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/16/20 6:49 PM, Sven Schuchmann wrote:
>> Note, with older versions of udev it was possible to rename interfaces within
>> the same namespace, e.g. use "NAME=can0". I think this doesn't work with newer
>> udevs anymore, so in this example "mcp?" is used.
>>
> Since I am on systemd 241 on a RaspberryPi I decided to go for udev style
> 
> created /etc/udev/rules.d/70-can.rules with
> SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/platform/soc/*/*/*/spi0.0/net/can?", NAME="can0"
> SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/platform/soc/*/*/*/spi1.0/net/can?", NAME="can1"

Note: IFAIK this will not work with newer versions of udev....

> and tadaaaaa:
> [    6.917578] spi_master spi1: will run message pump with realtime priority
> [    6.936957] mcp251xfd spi1.0 can0: MCP2518FD rev0.0 (-RX_...
> [    6.956523] spi_master spi0: will run message pump with realtime priority
> [    6.971942] mcp251xfd spi0.0 can1: MCP2518FD rev0.0 (-RX_...
> [    7.006515] mcp251xfd spi1.0 rename3: renamed from can0
> [    7.041681] mcp251xfd spi0.0 can0: renamed from can1
> [    7.091563] mcp251xfd spi1.0 can1: renamed from rename3

...the "rename" trick doesn't work anymore. Better use a differnet name, e.g.:
mcp0 and mcp1.

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux