can: peak_usb: allow flashing of the CAN channel ID
authorStephane Grosjean <s.grosjean@peak-system.com>
Mon, 16 Jan 2023 20:09:27 +0000 (20:09 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 2 Feb 2023 16:39:18 +0000 (17:39 +0100)
commite7a7b3d22503d79ccd0c2536080ed3f7b10a23f6
treea0a5b384311a8aa3a1fb3ac5bc0860d1df137bda
parent517ad5e6761feca12f0fc78e7c6304560da853f4
can: peak_usb: allow flashing of the CAN channel ID

This patch adds callbacks that allow the user to set a new self-defined
CAN channel ID to all USB - CAN/CANFD interfaces of PEAK-System managed by
this driver, namely:
- PCAN-USB
- PCAN-USB FD
- PCAN-USB Pro FD
- PCAN-USB X6
- PCAN-Chip USB
- PCAN-USB Pro

The callback functions write the CAN channel ID to the non-volatile
memory of the devices.

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-4-lukas.magel@posteo.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_usb.c
drivers/net/can/usb/peak_usb/pcan_usb_core.h
drivers/net/can/usb/peak_usb/pcan_usb_fd.c
drivers/net/can/usb/peak_usb/pcan_usb_pro.c
drivers/net/can/usb/peak_usb/pcan_usb_pro.h