Re: [PATCH 6/6] can: peak_usb: add sysfs interface to internal device user value

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

 



On 17.11.2021 16:01:32, Stephane Grosjean wrote:
> This patch adds under /sys/class/net/canX a new group named "peak_usb"
> which contains a "dev_num" entry accessible for reading (display in
> decimal of the numerical value stored in non-volatile memory of the USB
> device) and also for writing (modification by the user of this value).
> 
> Signed-off-by: Stephane Grosjean <s.grosjean@xxxxxxxxxxxxxxx>

Please have a look at the ethtool eeprom interface:

| ethtool -e|--eeprom-dump devname [raw on|off] [offset N] [length N]
| ethtool -E|--change-eeprom devname [magic N] [offset N] [length N] [value N]

That looks better than adding a custom sysfs entry.

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: PGP 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