diff options
author | Lukas Magel <lukas.magel@posteo.net> | 2023-01-16 23:09:30 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2023-02-02 19:39:25 +0300 |
commit | 6d02f6daeb44c0099ace2e3597d56420eecfaeb2 (patch) | |
tree | a659ee4b12e549500e2f594b452fc68502dc8a2f /Documentation/ABI/testing/sysfs-class-net-peak_usb | |
parent | 36d007c6fc7962cb70ff4b1496d1e24f8b1c1300 (diff) | |
download | linux-6d02f6daeb44c0099ace2e3597d56420eecfaeb2.tar.xz |
can: peak_usb: export PCAN CAN channel ID as sysfs device attribute
This patch exports the CAN channel ID as a sysfs attribute. The CAN
channel ID is a user-configurable u8/u32 identifier that can be set
individually for each CAN interface of a PEAK USB device.
Exporting the channel ID as a sysfs attribute allows users to easily read
the ID and to write udev rules that can match against the ID. This is
especially useful for PEAK USB devices that do not export a serial
number at SUB level.
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Lukas Magel <lukas.magel@posteo.net>
Link: https://lore.kernel.org/all/20230116200932.157769-7-lukas.magel@posteo.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'Documentation/ABI/testing/sysfs-class-net-peak_usb')
-rw-r--r-- | Documentation/ABI/testing/sysfs-class-net-peak_usb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-net-peak_usb b/Documentation/ABI/testing/sysfs-class-net-peak_usb new file mode 100644 index 000000000000..9e3d0bf4d4b2 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-peak_usb @@ -0,0 +1,19 @@ + +What: /sys/class/net/<iface>/peak_usb/can_channel_id +Date: November 2022 +KernelVersion: 6.2 +Contact: Stephane Grosjean <s.grosjean@peak-system.com> +Description: + PEAK PCAN-USB devices support user-configurable CAN channel + identifiers. Contrary to a USB serial number, these identifiers + are writable and can be set per CAN interface. This means that + if a USB device exports multiple CAN interfaces, each of them + can be assigned a unique channel ID. + This attribute provides read-only access to the currently + configured value of the channel identifier. Depending on the + device type, the identifier has a length of 8 or 32 bit. The + value read from this attribute is always an 8 digit 32 bit + hexadecimal value in big endian format. If the device only + supports an 8 bit identifier, the upper 24 bit of the value are + set to zero. + |