RE: About sysfs usage by socket-can drivers

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

 



> Can you query the possible clock rates? Either add to ethtool

Yes the available clock rates list can be provided (by the driver). How to do that through ethtool please?

> or make it a CAN specific callback.

Do you propose to extend "struct can_priv" so that the clock could be selectect from netlink?

-- Stéphane




            De: Marc Kleine-Budde
Envoyé: Jeudi 23 juillet 2020 22:13
À: Stéphane Grosjean
Cc: linux-can@xxxxxxxxxxxxxxx
Objet: Re: About sysfs usage by socket-can drivers




On 7/23/20 9:39 PM, Stéphane Grosjean wrote:

>>> - changing the default clock value,

>

>> The input clock rate for the CAN IP Core?

> Yes



Can you query the possible clock rates? Either add to ethtool or make it a CAN

specific callback.



>>> - reading the bus load value,

>> ..as calculated by the USB device?

>

> or by the IP core, yes.



maybe we can add this to ethtool's stats, otherwise to the CAN stats.



>>> - using a flashed device id. to better control the can interface number,

>

>> Can you make use of dev_id/dev_port

>> https://elixir.bootlin.com/linux/latest/source/include/linux/netdevice.h#L1687

>

> Ok. I'll check that, thanks.

>

>

>>> - identifying the (USB) channel

>

>> Does udev offer all needed information? E.g.:

>

> Sorry, nope: identify the USB adapter <=> flash the LED (which USB device corresponds to which canX)



Use ethtool's set_phys_id for this:



https://elixir.bootlin.com/linux/latest/source/drivers/net/can/usb/gs_usb.c#L762



You can either implement a "activate blink", "deactivate blink" or "switch LED

on", "switch LED off" (and I think the core will take care of blinking).



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 |






--
PEAK-System Technik GmbH
Sitz der Gesellschaft Darmstadt - HRB 9183
Geschaeftsfuehrung: Alexander Gach / Uwe Wilhelm
Unsere Datenschutzerklaerung mit wichtigen Hinweisen
zur Behandlung personenbezogener Daten finden Sie unter
www.peak-system.com/Datenschutz.483.0.html




[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