-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge patch series "can: peak_usb: Introduce configurable CAN channel…
… ID" Lukas Magel <lukas.magel@posteo.net> says: This series of patches introduces the CAN channel ID for the PEAK USB CAN interfaces. The id can be read/written via ethtool and is exposed as a read-only attribute via sysfs. This allows users to set the id via ethtool and write udev rules to match against the sysfs attribute. Part of the patches were originally introduced by Stéphane Grosjean and were modified slightly. See the following threads for the original patches: * https://lore.kernel.org/linux-can/20220128150157.1222850-1-s.grosjean@peak-system.com * https://lore.kernel.org/linux-can/20211117150132.37056-1-s.grosjean@peak-system.com changes since v2: https://lore.kernel.org/all/20221030105939.87658-1-lukas.magel@posteo.net * Fix the issues raised on netdev * Rename user device ID to CAN channel ID to make the 1-to-N mapping between USB device and exposed CAN channels more obvious changes since v1: https://lore.kernel.org/all/20221022213535.8495-1-lukas.magel@posteo.net * Fix type of devid_le in ethtool peak_usb_(get|set)_eeprom * Fix signed-off tags Link: https://lore.kernel.org/all/20221213080309.9013-1-lukas.magel@posteo.net [mkl: added links] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
- Loading branch information
Showing
7 changed files
with
265 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.